x = number of pairs of wool socks
y = number of pairs of cotton socks
wool socks = $3 per pair
cotton socks = $2 per pair
Total pairs = 7
⇒ x + y = 7
Total cost = $18
⇒ 3x + 2y = 18
Solve for x and y:
x + y = 7 ------------------ (1)
3x + 2y = 18 ------------- (2)
(1) x 2 : 2x + 2y = 7
2x + 2y = 14 ------------- (1a)
3x + 2y = 18 ------------- (2)
(2) - (1a): x = 14
Sub x = 11 into (1): 4 + y = 7
y = 3
x = 4, y = 3
Answer: 4 pairs of wool socks and 3 pairs of cotton socks