Question

$$q=30-4P- { P }^{ 2 }$$

Solve for P

$P=-\sqrt{34-q}-2$
$P=\sqrt{34-q}-2\text{, }q\leq 34$

Solve for q

$q=30-4P-P^{2}$