Step-by-step explanation:
If p is the number of physics books and s is the number of sociology books, then:
p + s = 440
s = p - 54
Substituting:
p + (p - 54) = 440
2p - 54 = 440
2p = 494
p = 247
Solving for s:
s = p - 54
s = 247 - 54
s = 193
The store sold 247 physics books and 193 sociology books.