This is basically a problem of two unknowns - the price of one book and the number of books bought. So we need to set up two equations to solve this.
Let's use p for the original price of one book, and x for the original number of books bought.
Then we know that the man spent $1200 for the original number of books at the original price, or p*x = 1200.
We also know that when the price goes up by $30 per book, the man can afford two fewer books for the same price, or (p + 30)*(x - 2) = 1200.
Let's simplify that second equation a bit:
(p+30)(x-2) = 1200 =>
px + 30x - 2p - 60 = 1200 =>
px + 30x - 2p = 1260
Now we have a system of two equations with two unknowns:
px = 1200
px + 30x - 2p = 1260
Now we isolate one variable in one of the equations. Let's use the first one, since it's easy:
p = 1200/x
Then we substitute this into the second equation:
px + 30x - 2p = 1260 =>
(1200/x)x + 30x - 2(1200/x) = 1260 =>
1200 + 30x - 2400/x = 1260 =>
30x - 2400/x = 60
We want to get rid of that x in the denominator, so let's multiply the whole equation by x:
30x^2 - 2400 = 60x
We can simplify this equation by dividing the whole thing by 30:
(30/30)x^2 - 2400/30 = (60/30)x
x^2 - 80 = 2x
This is a quadratic equation, so we can use the quadratic formula to solve it. First, let's put it in the standard ax^2 + bx + c = 0 form:
x^2 - 2x - 80 = 0
Now we use the quadratic formula to get the roots (the values of x that make the right side of the equation equal to 0). The quadratic formula is:
\[x = \frac{ -b \pm \sqrt{b^2 - 4ac} }{ 2a }\]
So this gives us
\[x = \frac{ 2 \pm \sqrt{(-2)^2 - 4(1)(-80)} }{ 2(1) }\]
\[ = \frac{ 2 \pm \sqrt{4 +320} }{ 2 }\]
\[ = \frac{ 2 \pm \sqrt{324} }{ 2 }\]
\[ = \frac{ 2 \pm 18 }{ 2 }\]
This gives us two possible solutions:
x = -16/2 = -8, and x = 20/2 = 10
Remember that x is the number of books the man bought, so the negative solution doesn't make any sense. So the man must have originally bought 10 books. Now we can plug that back into our first equation:
px = 1200 =>
p(10) = 1200 =>
p = 120
Therefore, the original price of each book was $120.
You can check this by testing with the second equation to see if these values make sense:
(x - 2)(p + 30) = 1200 =>
(10 - 2)(120 + 30) = 1200 =>
8*150 = 1200 =>
1200 = 1200
Therefore, our solution is correct.