How to solve a ratio problem