Solving for the value of X