[proofplan]
We use the defining representation of a rational formal [power series](/page/Power%20Series). Since $A(X)$ is rational, it satisfies a linear equation with polynomial coefficients, namely $Q(X)A(X)-P(X)=0$. Viewing $P(X)$ and $Q(X)$ as elements of the rational function field $K(X)$, this becomes a nonzero polynomial equation in one indeterminate over $K(X)$, so $A(X)$ is algebraic over $K(X)$.
[/proofplan]
custom_env
admin
[step:Turn the rational representation into a polynomial equation over $K(X)$]By rationality, choose polynomials $P(X),Q(X)\in K[X]$ with $Q(0)\neq 0$ such that
\begin{align*}
Q(X)A(X)=P(X)
\end{align*}
in $K[[X]]$.
Let $T$ be an indeterminate over $K(X)$, and define
\begin{align*}
F(T)=Q(X)T-P(X)\in K(X)[T].
\end{align*}
Since $Q(0)\neq 0$, the polynomial $Q(X)$ is nonzero in $K[X]$, hence also nonzero in $K(X)$. Therefore $F(T)$ is a nonzero polynomial in $K(X)[T]$.[/step]
custom_env
admin
[guided]The hypothesis that $A(X)$ is rational means precisely that $A(X)$ can be represented by a quotient of polynomials in the formal-power-series sense. Thus there are polynomials $P(X),Q(X)\in K[X]$ with $Q(0)\neq 0$ such that multiplication in $K[[X]]$ gives
\begin{align*}
Q(X)A(X)=P(X).
\end{align*}
The condition $Q(0)\neq 0$ is stronger than merely saying that $Q(X)$ is nonzero; it is the formal-power-series condition ensuring that the quotient $P(X)/Q(X)$ expands as an element of $K[[X]]$. For the algebraicity argument, what we need is that $Q(X)$ is nonzero. Since $Q(0)\neq 0$, $Q(X)\neq 0$ in $K[X]$, and therefore $Q(X)\neq 0$ after embedding $K[X]$ into $K(X)$.
Now let $T$ be an indeterminate over the field $K(X)$, and define
\begin{align*}
F(T)=Q(X)T-P(X)\in K(X)[T].
\end{align*}
This polynomial is not the zero polynomial because its coefficient of $T$ is the nonzero element $Q(X)\in K(X)$.[/guided]
custom_env
admin
[step:Evaluate the polynomial at $A(X)$ and conclude algebraicity]
Evaluating $F(T)$ at $T=A(X)$ gives
\begin{align*}
F(A(X))=Q(X)A(X)-P(X)=0.
\end{align*}
Thus $A(X)$ satisfies the nonzero polynomial equation $F(A(X))=0$ with $F(T)\in K(X)[T]$. By the definition of algebraicity over $K(X)$, the formal power series $A(X)$ is algebraic over $K(X)$.
[/step]