Math Olympiad | How to solve for X in this problem ?