How to find value of k in equation