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
 A: Just add $10$ to your $f(x)$...it becomes the remainder when you do the division.
A: 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}$
A: "Then, I realized that the remainder has to be 10 not 0...I have no idea how to do that"
Don't you?
If $f(x) = (x+3)(2x^2 -x + 7)$ then
$f(x) + r = (x+3)(2x^2-x +7) + r$
And $f(x) + 10 = (x+3)(2x^2-x +7) +10$.
And doesn't that mean the remainder of $f(x)\div (x+3) = 10$?
After all if we divide $(x+3)(2x^2 -x +7) + 10$ we'd get $\frac {(x+3)(2x^2 - x+ 7)}{x+3} = 2x^2 -x + 7$ and then .... we'd be left with the remainder of $10$.
So if you are told $f(x)$ divided by $d(x)$ has a quotient of $q(x)$ and a remainder of $r$ then you can just do $f(x) = d(x)q(x) + r$.
And so $g(x) = (x+3)(2x^2 - x+7) + 10=$
$(2x^3+5x^2+4x+21) + 10=$
$2x^3 + 5x^2 +4 + 31$
has to do it and if we did that we'd have:

