We are told that the polynomial:
- has a remainder $\var{rem1}$ when divided by $(\simplify{x+{c}})$
- has a remainder $\var{rem2}$ when divided by $(\simplify{x+{d}})$
a)
Firstly, substituting $x = \simplify{-{c}}$ into $p(x)$ gives us
\begin{align}
p(\simplify{-{c}}) &= \simplify[all,!collectNumbers, fractionnumbers]{{coef2_x3*(-c)^3}+{(-c)^2}s+{coef2_x*(-c)}+t},\\
&= \simplify[all,fractionnumbers]{{coef2_x3*(-c)^3}+{(-c)^2}s+{coef2_x*(-c)}+t}.
\end{align}
But, by the remainder theorem $p(\simplify{-{c}}) = \var{rem1}$ (using the first bullet point), so this becomes
\begin{align}
\simplify[all,fractionnumbers]{{coef2_x3*(-{c})^3}+s*{(-{c})^2}+{coef2_x*(-{c})}+t} &= \var{rem1},\\
\simplify[all,fractionnumbers]{s*{x}+t} &= \simplify[all,fractionnumbers]{{rem1}-{coef2_x3*(-{c})^3}-{coef2_x*(-{c})}}.
\end{align}
b)
Similarly, substituting $x = \simplify{-{d}}$ into $p(x)$, gives us
\begin{align}
p(\simplify{-{d}}) &= \simplify[all,!collectNumbers, fractionnumbers]{{coef2_x3*(-{d})^3}+{(-{d})^2}s+{coef2_x*(-{d})}+t},\\
&= \simplify[all,fractionnumbers]{{coef2_x3*(-{d})^3}+{(-{d})^2}s+{coef2_x*(-{d})}+t}.
\end{align}
But, by the remainder theorem $p(\simplify{-{d}}) = \var{rem2}$ (using the second bullet point), so this becomes
\begin{align}
\simplify[all,fractionnumbers]{{coef2_x3*(-{d})^3}+s*{(-{d})^2}+{coef2_x*(-{d})}+t} &= \var{rem2},\\
\simplify[all,fractionnumbers]{s*{y}+t} &= \simplify[all,fractionnumbers]{{rem2}-{coef2_x3*(-{d})^3}-{coef2_x*(-{d})}}.
\end{align}
c)
We now have two simultaneous equations for $s$ and $t$:
\begin{align}
\simplify[all,fractionnumbers]{s*{x}+t} = \simplify[all,fractionnumbers]{{rem1}-{coef2_x3*(-{c})^3}-{coef2_x*(-{c})}} \\
\simplify[all,fractionnumbers]{s*{y}+t} = \simplify[all,fractionnumbers]{{rem2}-{coef2_x3*(-{d})^3}-{coef2_x*(-{d})}}
\end{align}
Next, we subtract the second equation from the first equation.
This allows us to cancel out the terms involving $t$ and gives us an equation only in terms of $s$, which we can then rearrange to find the value of $s$.
Subtracting the two equations gives
\[\simplify{s*{(-{c})^2-(-{d})^2}} = \simplify[all,fractionnumbers]{{rem1 - coef2_x3*(-c)^3-coef2_x*(-c)-rem2+coef2_x3*(-d)^3+coef2_x*(-d)}}.\]
Then, we can rearrange this equation so that
\[s = \simplify[all,fractionnumbers]{{rem1 - coef2_x3*(-c)^3-coef2_x*(-c)-rem2+coef2_x3*(-d)^3+coef2_x*(-d)}/{{(-c)^2-(-d)^2}}}.\]
d)
We can calculate $t$ by substituting our value of $s$ into one of our original simultaneous equations. For example, let's use the equation
\[\simplify[all,fractionnumbers]{s*{(-{d})^2}+t} = \simplify[all,fractionnumbers]{{rem2}-{coef2_x3*(-{d})^3}-{coef2_x*(-{d})}}.\]
Substituting our value of $s$ into this equation gives us
\[
\begin{align}
\simplify[all,fractionnumbers,!noleadingMinus]{{numerator/denominator}+t} &= \simplify[all,fractionnumbers]{{rem2-coef2_x3*(-d)^3-coef2_x*(-d)}},\\
t &= \simplify[all,fractionnumbers]{{rem2-coef2_x3*(-d)^3-coef2_x*(-d) - numerator/denominator}}.
\end{align}
\]
This same answer would've also been obtained if we had substituted our value of $s$ into the other equation instead.