Doubt how to solve math question