[x^2(x+y) - x(x+y) - x^2y]/(x+y)
=[x^3 + x^2y - x^2 -xy -x^2y]/(x+y)
= [x^3--x^2 -xy]/(x+y)
This a good exam question and there are several pitfalls you want to avoid in solving this type of problem.
To answer your question visually, Dr. Pan (MathDoc) has recorded a YouTube video. Please follow the link below: