x + y = 57 and x = y+18
Substitute the second equation into the first for x.
y + 18 + y = 52
2y = 34
y = 17
x = y + 18 = 17 + 18 = 35. The more expensive shirt was $35.