Please find the attached graph.
Let x represent number of shirts and y represent number of caps.
We have been given that Mikhael, Hema, and 5 friends will help run their school's fundraiser. They will wear either a red shirt or a red baseball cap during the event.
Since there are 7 people in total, so total number of caps and shirts will be 7. We can represent this information in an equation as:
[tex]x+y=7...(1)[/tex]
We are also told that Shirts cost $8 each and caps cost $4 each. So cost of x shirts would be [tex]8x[/tex] and cost of y caps would be [tex]4y[/tex].
Since they want to spent exactly $40, so cost of x shirts and y caps will be equal to 40. We can represent this information in an equation as:
[tex]8x+4y=40...(2)[/tex]
We can divide equation (2) by 4 as:
[tex]2x+y=10...(2)[/tex]
We can see from our attached graph that solution of this system is (3,4), therefore, 3 friends will wear shirts and 4 will wear caps to stay in the budget.