From $\pi = \frac{a_n\pi^{3n}+\ldots+a_1\pi^3+a_0}{b_m\pi^{3m}+\ldots +b_1\pi^3+b_0}$ with $a_n\ne0$, $b_m\ne0$ we obtain a polynomial equation for $\pi$: $\tag1(b_m\pi^{3m+1}+\ldots +b_1\pi^4+b_0\pi)-(a_n\pi^{3n}+\ldots+a_1\pi^3+a_0)=0.$ If $n>m$, this is of degree $3n$ with leading coefficient $-a_n\ne 0$, if $n\le m$ this is of degree $3m+1$ with leading coefficient $b_m\ne0$. Hence $(1)$ shows that $\pi$ is algabraic, which it isn't.
From $\sqrt 2=\frac{a_n\pi^{n}+\ldots+a_1\pi+a_0}{b_m\pi^{m}+\ldots +b_1\pi+b_0},$ we obtain $2=\frac{a_n^2\pi^{2n}+\ldots+2a_0a_1\pi+a_0^2}{b_m^2\pi^{2m}+\ldots +2b_0b_1\pi+b_0^2},$ hence $\tag2(a_n^2\pi^{2n}+\ldots+a_0^2)-2(b_m^2\pi^{2m}+\ldots +b_0^2)=0.$ Since $\pi$ is transcendental, this must be the zero polynomial, i.e. everything cancels. Especially, we must have $n=m$ and $a_n^2-2b_m^2=0$. But then $\sqrt 2=\left\vert\frac{a_n}{b_m}\right\vert\in\mathbb Q$.