We have the perimeter of first dimension 2(8 + 4) = 24; The perimeter of the second dimension is 2( 8 + 54 + 4 + 54 ) = 240 We calculate p/100 = 24/240; Then p/100 = 1/10; p = 100/10; p = 10; Finally, 10% is the answer.
Your question says “...x represents the number of times he eats out”, when he eats out its $6, so that means obviously that the x would be by the 6 and the less then symbol would be facing 87 cause your wont to spend less then that amout.