Given $a=r^2\pi h,c=2r\pi h+r^2\pi$, how to find $r$ and $h$ in terms of $a$ and $c$? Given the values of $a$ and $c$ and that
  $$a=r^2\pi h,\quad
c=2r\pi h+r^2\pi,$$
  what are the values of $r$ and $h$?


So recently on a math test, I got this question which I couldn't seem to figure out. It was really boggling my mind and I later found out that I just had interpreted the question wrong, but I was still set on finding out the solution to the problem. I can't seem to do it and wonder if anyone could help.
From the first equation we have that 
$$
2\pi r h = 2\frac{a}{r}
$$
so we can substitute to the second one and then
$$
c=2\frac{a}{r}+r^2 \pi\qquad\text{so}\qquad cr=2a+r^3\pi 
$$
and now the only thing you have to do is to solve this equation using Cardano formula and get that 
$$
r=\frac{\left(\sqrt{81 \pi  a^2-3 c^3}-9 \sqrt{\pi } a\right)^{2/3}+\sqrt[3]{3}
   c}{3^{2/3} \sqrt{\pi } \sqrt[3]{\sqrt{81 \pi  a^2-3 c^3}-9 \sqrt{\pi } a}}
$$
and now by substituting to the first formula you get 
$$
h=\frac{a}{r^2 \pi}=\frac{3 \sqrt[3]{3} a \left(\sqrt{81 \pi  a^2-3 c^3}-9 \sqrt{\pi }
   a\right)^{2/3}}{\left(\left(\sqrt{81 \pi  a^2-3 c^3}-9 \sqrt{\pi }
   a\right)^{2/3}+\sqrt[3]{3} c\right)^2}
$$
From the first equation we have that 
$$
2\pi r h = 2\frac{a}{r}
$$
so we can substitute to the second one and then
$$
c=2\frac{a}{r}+r^2 \pi\qquad\text{so}\qquad cr=2a+r^3\pi 
$$
and now the only thing you have to do is to solve this equation using Cardano formula and get that 
$$
r=\frac{\left(\sqrt{81 \pi  a^2-3 c^3}-9 \sqrt{\pi } a\right)^{2/3}+\sqrt[3]{3}
   c}{3^{2/3} \sqrt{\pi } \sqrt[3]{\sqrt{81 \pi  a^2-3 c^3}-9 \sqrt{\pi } a}}
$$
and now by substituting to the first formula you get 
$$
h=\frac{a}{r^2 \pi}=\frac{3 \sqrt[3]{3} a \left(\sqrt{81 \pi  a^2-3 c^3}-9 \sqrt{\pi }
   a\right)^{2/3}}{\left(\left(\sqrt{81 \pi  a^2-3 c^3}-9 \sqrt{\pi }
   a\right)^{2/3}+\sqrt[3]{3} c\right)^2}
$$