Showing the Composition of Two Polynomials is a Polynomial and the Composition of Two Rational Functions is a Rational Function This seems very obvious and I am having a bit of trouble producing a formal proof.
sketch proof that the composition of two polynomials is a polynomial
Let $$p(z_1)=a_nz^n_1+a_{n-1}z^{n-1}_1+...+a_1z_1+a_0 \\ q(z_2)=b_nz^n_2+b_{n-1}z^{n-1}_2+...+b_1z_2+b_0$$ be two complex polynomials of degree $n$ where $a_n,..,a_0\in\mathbb{C}$ and $b_n,..,b_o\in\mathbb{C}$.
Now, 
\begin{align}
(p\circ q)(z_2)&=p(q(z_2)) \ \ \ \ \ \text{(by definition)}\\
&=a_n(q(z_2))^n+a_{n-1}(q(z_2))^{n-1}+...+a_1(q(z_2))+a_0
\end{align}
which is clearly a complex polynomial of degree $n^2$.
sketch proof that the composition of two rational functions is a rational function
A rational function is a quotient of polynomials. 
Let $$a(z_1)=\frac{p(z_1)}{q(z_1)}, \ b(z_2)=\frac{p(z_2)}{q(z_2)}$$
Now, 
\begin{align}
(a\circ b)(z_2)&=a(b(z_2)) \ \ \ \ \ \text{(by definition)} \\
&=\frac{p\left(\frac{p(z_2)}{q(z_2)}\right)}{q\left(\frac{p(z_2)}{q(z_2)}\right)} \\
&=\frac{a_n\left(\frac{p(z_2)}{q(z_2)}\right)^n+a_{n-1}\left(\frac{p(z_2)}{q(z_2)}\right)^{n-1}+...+a_1\left(\frac{p(z_2)}{q(z_2)}\right)+a_0}{b_n\left(\frac{p(z_2)}{q(z_2)}\right)^n+b_{n-1}\left(\frac{p(z_2)}{q(z_2)}\right)^{n-1}+...+b_1\left(\frac{p(z_2)}{q(z_2)}\right)+b_0} \\
\end{align}
Notice that $\left(\frac{p(z_2)}{q(z_2)}\right)^i \ \ \ \ (i=n, n-1,..,0)$ is a polynomial as
 $$(f\circ g)(z_2)=f(g(z_2))=\left(\frac{p(z_2)}{q(z_2)}\right)^i$$
where $$f(x)=x^i, \ \ g(z_2)=\left(\frac{p(z_2)}{q(z_2)}\right)$$ are both polynomials. 
Hence $(a\circ b)(z_2)$ is a rational function as it is the quotient of polynomials.
 A: Remark for your proof of composition of polynomials is a polynomial: 


*

*perhaps you should work with two arbitrary polynomials of degree $m$ and $n$ to have generality.


Remark for your proof of composition of composition rational functions is a rational function: 


*

*you wrote $a(z_1)=\frac{p(z_1)}{q(z_1)}$ and $b(z_2) = \frac{p(z_2)}{q(z_2)}$ which means $a$ and $b$ seems to be the same function.

*$\left( \frac{p(z_1)}{q(z_2)}\right)^i$ is a rational function rather than a polynomial.
Guide for proof of composition of polynomials is a polynomial:


*

*First prove that products of two polynomials is a polynomial. Once you can do that, we have that suppose $p$ is a polynomial, then $p(x)^i$ is a polynomials by mathematical induction.

*Prove that the set of polynomials is closed under scalar multiplication.

*Prove that the set of  polynomials is closed under addition.

*With those lemmas (tools), I believe now you can prove that composition of polynomials is a polynomials. (remember to use arbitrary polynomials of degree $m$ and degree $n$.)


Guide for proof of composition of rational functions is a rational function:


*

*First prove that products of two rational function is a rational function. Once you can do that, we have that suppose $h$ is a rational function, then $h(x)^i$ is a rational function by mathematical induction.

*Prove that the set of rational functions is closed under scalar multiplication.

*Prove that the set of rational function is closed under addition.

*Prove that the set of rational function is closed under division.

*With those lemmas (tools), I believe now you can prove that composition of rational functions is a rational function. Let $a(z)= \frac{p(z)}{q(z)}$ and $b(z) = \frac{r(z)}{s(z)}$ and use those tools that you have verified.

