We can create the following system of equations:
(1) Number of shirts the manager ordered was two more than twice the number of hats:
Let x be the number of shirts
Let y be the number of hats
[tex]x=2y+2[/tex](2) manager purchased a total of 38 souvenir:
[tex]x+y=38[/tex]Since we have our system of equations, to solve it we can isolate one variable from equation (2) and substitute it in equation (1):
[tex]y=38-x[/tex](2) in (1):
[tex]\begin{gathered} x=2(38-x)+2 \\ x=76-2x+2 \\ 2x+x=76+2 \\ 3x=78 \\ x=\frac{78}{3} \\ x=26 \end{gathered}[/tex]He purchased 26 shirts.
Now, with the x-value we are going to substitute it in (2) to find the y-value(number of hats purchased)
[tex]\begin{gathered} y=38-26 \\ y=12 \end{gathered}[/tex]He purchased 12 hats.
Answer:
He purchased 26 shirts and 12 hats.