If an adult ticket costs $10, and a chlid's ticket is $5, then one possible combination of tickets could be 30 adult tickets and 10 children tickets. Another could be to sell 15 adult tickets and 25 children tickets.
29 miles because town y is between town x and town z so you can take the distance between town x and town z and subtract the distance from town y to town z