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:
We are also told that Shirts cost $8 each and caps cost $4 each. So cost of x shirts would be
and cost of y caps would be
.
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:
We can divide equation (2) by 4 as:
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.