12. A person travels from location A to location B. If he rides a motorcycle from A for 12 hours, then switches to a bicycle for 9 hours, he will arrive at B exactly. If he rides a bicycle from A for 21 hours, then switches to a motorcycle for 8 hours, he will also arrive at B exactly. How many hours would it take to travel the entire distance by motorcycle?
12.【Solution】The motorcycle takes $12-8=4$ (hours) to travel the distance, while the bicycle needs $21-9=12$ (hours).

The motorcycle takes to complete the entire journey: $12+9 \times \frac{12-8}{21-9}=15$ (hours)