Total books sold : 84.
Let's call "x" the physics books and "y" the mathematics books.
y - 12 = x
x + y = 84
So,
y - 12 + y = 84
2y = 84+12
2y = 96
y = 96/2 = 48
Then, let's find x.
x = 48 - 12 = 36.
I think he had 48 physics books. I am not sure i am 100% right but hopefully yes.
Hope this helps !
Photon