How to solve this question and find the value of X?