Let the cost of t shirt be 'x' and hat be 'y'
3x + 2y = 14
3x = 14 - 2y
x = (14 - 2y)/3
2x + 7y = 15
2(14 - 2y)/3 + 7y = 15
28 - 4y + 21y = 15×3
28 + 17y = 45
17y = 45 - 28
17y = 17
y = 17/17
y = 1
x = (14 - 2×1)/3 = 12/3 = 4
Cost of one t-shirt = x = £4
Cost of one hat = y = £1