The number of people who went to the movies is X
Half went to a restaurant -> X/2
Of those who did not go to the restaurant (X/2) -> half went for a walk (X/4) + 4 returned to their houses. There were 5 left
with that information, we can write the following equation:
![(x)/(2)=(x)/(4)+4+5](https://img.qammunity.org/2023/formulas/mathematics/high-school/mktuoa4rk7hw4o2wqboy8z40at4is8jbrw.png)
now, we just need to solve for x, as follows
![\begin{gathered} (x)/(2)=(x)/(4)+4+5 \\ (x)/(2)=(x)/(4)+9 \\ (x)/(2)-(x)/(4)=9 \\ x((1)/(2)-(1)/(4))=9 \\ x((2)/(4)-(1)/(4))=9 \\ x((2-1)/(4))=9 \\ x\cdot((1)/(4))=9 \\ x=4\cdot9 \\ x=36 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/high-school/mdjtv6uxho9v10ioxg4kzh4on448aje6hs.png)
in conclusion, 36 people went to the movies