How to find the value of x