You can make 6 different towers. If red was at the bottom, there'd be two different possibilities for that: red, yellow, blue, and red, blue, yellow. Same for if blue was at the bottom: blue, red, yellow, and blue, yellow, red. Yellow also applies: yellow, red, blue, and yellow, blue, red. 3*2=6, so 6 possible towers.
If you break down the beginning part, its 150 ÷ 3 = 50, so that means each class took 50 minutes. Not only that, you get your 'Time/Minutes per Class'. From there, you can multiply 50 by 5 and get 250 minutes, or 4 hours and 10 minutes.