how to solve this problem in math