How to solve this Mathematical Problem?