I'm trying to solve the fireman's optimization problem. It boils down to factoring the following expression:
$2\left ( q + \frac{pq}{a} \right )\cdot \left ( -\frac{pq}{a^2} \right ) + 2(p+a)$
I have spent around 5 pages of paper trying to solve this but to no avail. According to the solution you can factor out $2(p+a)$, but how? This is not homework by the way.
Any help is appreciated.
Since $q+\frac{pq}{a}=\frac{q}{a}(a+p)$, your expression factorises to $$2(p+a)\left(\frac{q}{a}\frac{-pq}{a^2}+1\right)=2(p+a)(1-pq^2/a^3).$$