Based on the situation, it forms into a right triangle. So we will apply the Pythagorean Theorem here. The ladder acts as the hypotenuse while the height from the ground to the window serves as our side "a". We are tasked to solve for "b". Side "b" is the distance from foot of side a to the tip of side c which is the hypotenuse (ladder). We will derive the formula below to solve for b.
There was 10 friends because there if you times 2/3 by 6 you get 12/18 and 10 people eat it then there is 3/18 left and after you simpfly it you get 1/6