Let x = price of shorts
Let y = price of socks
now create the equations
2x + 3y = 33 (2 shorts + 3 socks equal 33)
1x + 5y = 27 (1 shorts + 5 socks equal 27)
multiply the second equation by 2 and subtract
2x + 3y =33
2x +10y =54 (multiplied by 2)
now subtract
-7y = -21
y = 3
now solve for x
2x + 3(3) = 33
2x + 9 = 33
2x =24
x = 12
so shorts cost $12
and socks cost $3