Let H = the number of history books sold in the store. Let P = the number of physics books.The problem says "three times as many physics books are sold", so we can set two equations in two variables that describe this scene. Equation 1 writes the second sentence; Equation 2 writes the third sentence


We then solve this two-by-two (two equations, two variables) system. It's easiest by substitution.



So, we sold 116 history books. We put our known number back into Equation 2 at the beginning, and find out that we sold 116 * 3, or 348, physics books.
Thus, the store sold 348 physics books and 116 history books.