We can do it by algebraic long division:
#"dividend"/"divisor" = "quotient"#

Write the dividend in the 'box' making sure that the indices are in descending powers of x. Make spaces for any missing terms.

Divide the first term in the divisor into the term in the dividend with the highest index. Write the answer at the top,

Multiply by BOTH terms of the divisor at the side

Subtract

Bring down the next term
Repeat steps 2 to 5
#color(white)(xxxxxx.xxxxxx)color(red)(x^2)" " color(blue)(+xy)" "+color(lime)(y^2) " rem "2y^3 #
#color(white)(xxx)xy bar( x^3 +0x^2y+0xy^2 +y^3" "larrx^3divx =color(red)(x^2#
#color(white)(xxxxx)(ul(color(red)(x^3x^2y)))" "larr# subtract
#color(white)(xxxxxxxxxx) +x^2y" "larrx^2y div x = color(blue)(xy)#
#color(white)(xxxxxx.x.)(ul(color(blue)(x^2yxy^2)))color(white)(x)darr" "larr# subtract
#color(white)(xxxxxxxxxxx.x.xxx)xy^2 y^3 " "larrxy^2divx = color(lime)(y^2)#
#color(white)(xxxxxxxx..x.xxx)ul(color(lime)((xy^2 +y^3)) " "larr# subtract
#color(white)(xxxxxxxxxxxxxxxxxxxx)2y^3larr" "# remainder
#(x^3 + y^3) div(xy) = x^2 +xy +y^2 " rem " 2y^3#