Applying the Chinese remainder theorem to the ring of polynomials

Let $R=\mathbb{R}[x]$ be the ring of polynomials and $I=(x^2+1)$, $J=(x+1)$ and $K=(x^3+x^2+x+1)$ ideals of $R$.

It's easy to see that there is a ring isomorphism between $R/K$ and $R/I \times R/J$. Find the element in $R/K$ whose image in $I \times J$ is $(2x+1+I,3+J)$.

How do I find this element? I know how to apply the Chinese remainder theorem in groups with $\mathbb{Z}/n\mathbb{Z}$, but I don't understand how I'm supposed to find this element in this case.

Let $p(x)$ and $q(x)$ be elements of $R$ whose associated principal ideals are comaximal. Then there exist polynomials $a(x)$ and $b(x)$ in $R$ such that $a(x)p(x) + b(x)q(x) = 1$ and we can use a process based on Euclid's algorithm for greatest common divisor (repeated division with remainder) to find these polynomials.
Certainly $a(x)p(x)\equiv 0$ mod $(p(x))$. More interesting, $a(x)p(x)\equiv 1$ mod $(q(x))$. Similarly, $b(x)q(x)\equiv 1$ mod $(p(x))$ and $b(x)q(x)\equiv 0$ mod $(q(x))$.
For this problem, take $p(x)= x^2+1$ and $q(x)=x+1$. The Euclidean algorithm requires only one division with remainder to give $x^2+1 = (x+1)(x-1) + 2$ from which we conclude that $$\left(\frac{1}{2}\right) (x^2 + 1) - \left(\frac{x-1}{2} \right)(x+1) = 1$$
The polynomial $$f(x) = -(2x+1) \left(\frac{x-1}{2} \right)(x+1) + 3 \left(\frac{1}{2}\right) (x^2 + 1)$$
is congruent to $(2x+1)$ mod $I$ and congruent to $3$ mod $J$. So $f(x)+K$ is the inverse image of $(2x+1+I, 3+J)$ that you seek.