What you have started is fine. If you learned how to do long division with numbers, division with polynomials is quite similar.
Step 1: what factor must you multiply (1+x^2) by to obtain an expression with x^3 in it?
Step 2: write the factor from step 1 on top over the x^3
Step 3: multiply the factor from Step 1 by (1 + x^2) and write the result below the polynomial inside the bracket. Write like powers underneath like powers.
Step 4: Subtract the product from the original polynomial being divided.
Step 5: If the result of the subtraction is a polynomial of smaller degree than(1+x^2), you can stop. Otherwise, repeat steps 1-4 above.
The quotient will be the entire expression on top of the brackets, and the remainder will be the expression of smaller degree than the divisor which is at the bottom of all of the subtractions.
Enjoy!