He will need 17 inches of ribbon.
The diagonal splits the square into two right triangles. We can then use the Pythagorean theorem to find the length of the diagonal (the hypotenuse of the triangle):
12² + 12² = x²
144 + 144 = x²
288 = x²
Take the square root of both sides:
√288 = √x²
16.97 = x
17≈x
5 + (3x) = 32
-5 -5
3x = 27
/3 /3
x = 9
B would be correct. The first two people, out of 100, would have painted 42.5/100 of the building.