Sham can take any one of three routes from school (S) to the town center (T), and can then take four possible routes from the town center to his home (H). He doesn't retrace his steps.
How many different possible ways can Sham walk home from school?
12
When there are m ways to do one task, and n ways to do another task, then there are m×n ways of doing both tasks one after the other.
Example: you have 3 shirts and 4 pants.
That means 3×4= 12 different outfits.
Sham can go from school to town center in 3 ways and from town center to home in 4 ways. So, the total number of ways in which Sham walks home from school= 3×4= 12 ways.