Let n = number of pigs bought originally
P = original price of each pig
The 2 equations will then be
nP = 210
(n-5)(P+4) = 210+65 = 275
Substitute P = 210/n into the second equation to get
4n2 - 85n - 1050 = 0 and the only positive answer from this quadratic is 30 or 30 original pigs!