Answers:
===========================================
Step-by-step explanation:
Look at the left most sides of each figure. Dividing the smaller side over the larger leads to 7/35 = (1*7)/(5*7) = 1/5. This is the scale factor. It means the blue figure's side lengths are 1/5th of the orange figure's corresponding side lengths.
So that explains why your teacher put A = 20(1/5) = 4
Multiplying the orange side lengths by the scale factor gets you the blue side lengths.
Now focus your attention on the far right most side lengths of 25 and B
We can see that B = 25(1/5) = 5 feet.