<s>[INST] Finding a polynomial $f(x)$ that when divided by $x+3$ yields quotient $2x^2-x+7$ and remainder $10$ I'm struggling to grasp this particular question:

When a polynomial $f(x)$ is divided by $x+3$, the quotient is $2x^2-x+7$ and the remainder is $10$. What is $f(x)$?

This is what I did:
$$\begin{align}
f(x) &= (x+3)(2x^2-x+7) \\
&= 2x^3-x^2+7x+6x^2-3x+21 \\
&= 2x^3+5x^2+4x+21
\end{align}$$
Making sure it is correct:

Then, I realized that the remainder has to be 10 not 0...I have no idea how to do that
 [/INST] In general, when you divide a function $p(x)$ by $q(x)$ and you get $f(x)$ as the quotient with a remainder of $r(x)$, you can alyways represent the answer as: $\frac{r(x)}{q(x)} + f(x)$
So you can rewrite your question algebraically as $\frac{10}{x+3} + 2x^2-x+7$ and then can simplify as follows:
$\frac{10}{x+3} + 2x^2-x+7 = \frac{10 + (x+3)(2x^2-x+7)}{x+3} = \frac{10 + 2x^3 -x^2+7x+6x^2-3x+21}{x+3} = \frac{2x^3 +5x^2 + 4x + 31}{x+3}$
</s>