Let the cost of a shirt be x, and let the cost of a sweater be y.
The cost of 5 shirts will be 5x and the cost of 4 sweaters will be 4y.
Since it is given that 5 shirts and 4 sweaters cost $267, it follows that:
[tex]5x+4y=267[/tex]This gives the first equation.
The cost of 3 shirts will be 3x and the cost of 5 sweaters will be 5y.
Since it is given that 3 shirts and 5 sweaters cost $259, it also follows that:
[tex]3x+5y=259[/tex]This forms the second equation.
Next, solve equations simultaneously:
[tex]\begin{gathered} 5x+4y=267 \\ 3x+5y=259 \\ \text{Multiply the first equation by 5 and the second equation by 4:} \\ 25x+20y=1335 \\ 12x+20y=1036 \\ \text{Subtract the second equation from the first to get:} \\ 25x-12x+20y-20y=1335-1036 \\ \Rightarrow13x+0=299 \\ \Rightarrow13x=299\Rightarrow\frac{13x}{13}=\frac{299}{13} \\ \Rightarrow x=23 \end{gathered}[/tex]Substitute the x value, x=23 into the first equation to get the value of y.
[tex]\begin{gathered} 5x+4y=267 \\ \Rightarrow5(23)+4y=267\Rightarrow115+4y=267 \\ \Rightarrow4y=267-115\Rightarrow4y=152 \\ \Rightarrow\frac{4y}{4}=\frac{152}{4}\Rightarrow y=38 \end{gathered}[/tex]Hence, the cost of a shirt is $23 and the cost of a sweater is $38.