When you say "Divisible by" x-y, that means that (x-y) is a polynomial factor, not exactly that xk−yk=m(x−y) where m is a positive integer, but that m is a polynomial.
Note that x2−y2=(x−y)(x+y) and (x3−y3)=(x−y)(x2+xy+y2).
If you do that example, that might help you with your homework. :)