Spivak, Ch. 20, Problem 9d: Understanding Solution Manual Proof The following problem is from Chapter 20 of Spivak's Calculus, "Approximation by Polynomial Functions".
My question is about item $(d)$, and I have previously asked a question about the comment at the end of item $(c)$.



*(a) Problem $7(i)$ amounts to the equation

$$P_{n,a,f+g}=P_{n,a,f}+P_{n,a,g}$$
Give a more direct proof by writing
$$f(x)=P_{n,a,f}(x)+R_{n,a,f}(x)\tag{1}$$
$$g(x)=P_{n,a,g}(x)+R_{n,a,g}(x)\tag{2}$$
and using the obvious fact about $R_{n,a,f}+R_{n,a,g}$.
(b) Similarly, Problem $7(ii)$ could be used to show that
$$P_{n,a,fg}=[P_{n,a,f}\cdot P_{n,a,g}]_n$$
where $[P]_n$ denotes the truncation of $P$ to degree $n$, the sum of
all terms of $P$ of degree $\leq n$ [with $P$ written as a polynomial
in $x-a$]. Again, give a more direct proof, using the obvious facts
about products involving terms of the form $R_n$.
(c) Prove that if $p$ and $q$ are polynomials in $x-a$ and
$\lim\limits_{x\to 0} \frac{R(x)}{(x-a)^n}=0$ then
$$p(q(x)+R(x))=p(q(x))+\bar{R}(x)$$
where $$\lim\limits_{x\to 0} \frac{\bar{R}(x)}{(x-a)^n}=0$$
Also note that if $p$ is a polynomial in $x-a$ having only terms of
degree $>n$, and $q$ is a polynomial in $x-a$ whose constant term is
$0$, then all terms of $p(q(x-a))$ are of degree $>n$.
(d) If $a=0$ and $b=g(a)=0$, then
$$P_{n,a,f\circ g}=[P_{n,b,f}\circ P_{n,a,g}]_n$$

Here is what the solution manual says

Writing
$$f(x)=P_{n,0,f}(x)+R_{n,0,f}(x)$$
$$g(x)=P_{n,0,g}(x)+R_{n,0,g}(x)$$
we have
$$(f\circ g)(x)=P_{n,0,f}(P_{n,0,g}(x)+R_{n,0,g}(x))+R_{n,0,f}(g(x))$$
$$=A+B$$
Part $(c)$ shows that
$$A=P_{n,0,f}(P_{n,0,g}(x))+\bar{R}(x)$$
where $$\lim\limits_{x\to a} \frac{\bar{R}(x)}{(x-a)^n}=0\tag{3}$$ and the
remark added at the end of $(c)$ shows that $$\lim\limits_{x\to a}
 \frac{B}{(x-a)^n}=0\tag{4}$$
Then, applying $(c)$ once again, we have
$$(f\circ g)(x)=(P_{n,0,f}\circ P_{n,0,g})(x)+\bar{\bar{R}}(x)\tag{5}$$
where $\lim\limits_{x\to a} \frac{\bar{\bar{R}}(x)}{(x-a)^n}=0$. It
follows, just as in part $(b)$, that $P_{n,0,f\circ g}=[P_{n,0,f}\circ
 P_{n,0,g}]_n$

Everything up to $(3)$ is fine. How do we obtain $(4)$?
My attempt at understanding it is:
Since $R_{n,0,f}$ is polynomial in $x-a=x$, composed of a single term of degree $n+1$, and $g(x-a)=g(x)$ is such that the constant term in its Taylor polynomial is zero ($g(a)=0$ by assumption), then as per the comment at the end of $(c)$ all of the terms in $R_{n,0,f}(g(x))$ are of degree $>n$.
Hence
$$\lim\limits_{x\to a} \frac{R_{n,0,f}(g(x))}{(x-a)^n}=0$$
My other question is: how exactly is part $(c)$ applied again to reach $(5)$? Ie, in the context of part $(c)$, when are the polynomials $p$ and $q$ here in part $(d)$?
EDIT: Clarifications required by the bounty

*

*The solution manual sets $a=b=g(a)=0$. I'd like to see a proof of $(d)$ that does not require $a=0$ or $b=0$, only $b=g(a)$.

*I will write an answer specifying my current understanding of the problem and solution.

 A: As a comment on your attempt, note that $R_{n,b,f}$ is not a polynomial. However, by hypothesis it can be written $R_{n,b,f}(x)=(x-b)^n r_{n,b,f}(x)$ where $\lim \limits_{x\to b} r_{n,b,f}(x)=0$.
The proof of (4)  involves the corrected versions of both (c) and the remark at the end of (c). It doesn't require $a=0$ or $b=0$ but does assume $b=g(a)$.

Substitute $g(x)$ into  $R_{n,b,f}(x) = (x-b)^n r_{n,b,f}(x)$ to obtain
$$B:=R_{n,b,f}(g(x)) = [g(x)-b]^n r_{n,b,f}(g(x)).$$ We can write
$$
[g(x)-b]^n=\big[P_{n,a,g}(x) + R_{n,a,g}(x)-b\big]^n = p\big(q(x) + R_{n,a,g}(x)\big)
$$ where $p$ and $q$ are the polynomials
$$p(x):=[x-b]^n,\qquad q(x):=P_{n,a,g}(x).$$
Since $R_{n,a,g}(x)/(x-a)^n\to0$ as $x\to a$, we can apply (c) to get
$$
[g(x)-b]^n=p(q(x)) + \overline R(x)
$$ where $\lim\limits_{x\to a}\frac{\overline R(x)}{(x-a)^n}=0$. Note now that $q$ is a polynomial in $x-a$, while $p$ is a polynomial in $x-b$ with $b:=g(a)=P_{n,a,g}(a)=q(a)$. So by the remark, $p(q)$ is a polynomial in $x-a$ with degree at least $n$.
Divide $B$ by $(x-a)^n$:
$$\frac B{(x-a)^n} = \left[
\frac{p(q(x))}{(x-a)^n} + \frac{\overline R(x)}{(x-a)^n}
\right]r_{n,b,f}(g(x))
$$
As $x\to a$, the first term in square brackets tends to a constant, the second term tends to zero, and $r_{n,b,f}(g(x))$ tends to zero because $g(x)$ tends to $g(a)=b$. This proves (4).

As for (5), there's no need to invoke (c) again. The argument establishes two Taylor polynomials of degree $n$ for $f\circ g$ at $a$, both of whose remainders, when divided by $(x-a)^n$, tend to zero as $x\to a$, hence the two polynomials are equal.
