There are two triangles: triangle MAB and triangle MNP
The slanted sides on the right side of the triangles are MB and MP. They correspond to one another. So they form a ratio MB/MP. I have the smaller piece up top. So we'll have the smaller piece of MAB's other known side which is MA = 35.2 (subtract 67.22 and 32) and we'll divide MA over MN = 67.2 making the ratio MA/MN
All you have to do is put the walking amount in for w and basketball in for b. Do it for all of these, if it is less than 400 or greater than 600, it is not a solution.
(4 x 40) + (5 x 40) = 360 so reject because it is less than 400.