Step-by-step explanation:
Suppose the cost of each t-shirt is x
and the cost of each hat is y
according to question
[tex]\Rightarrow 2x+3y=12\quad \ldots(i)\\\Rightarrow 5x+4y=23\quad \ldots(ii)\\\text{solving (i) and (ii) we get}[/tex]
[tex]x=3\ \text{and}\ y=2[/tex]
So, the cost of a t-shirt is £3
the cost of a hat is £2