Solution:
If x=0 then y=p and if y=0 then x=p. We will show that there are no other solutions.
Suppose x,y>0. Since x=y, we have
p(x2+xy+y2)=(x+y)(x2+y2)
If p divides x+y, then x2+y2 must divide x2+xy+y2 and so it must also divide xy. This is a contradiction as x2+y2⩾2xy>xy.
Thus p divides x2+y2, so x+y divides x2+xy+y2. As x+y divides x2+xy and y2+xy, it also divides x2, xy and y2. Suppose x2=a(x+y), y2=b(x+y) and xy=c(x+y). Then x2+xy+y2=(a+b+c)(x+y), x2+y2=(a+b)(x+y), while (x+y)2=x2+y2+2xy=(a+b+2c)(x+y) yields x+y=a+b+2c.
Substituting into (∗) gives
p(a+b+c)=(a+b+2c)(a+b)
Now let a+b=dm and c=dc1, where gcd(m,c1)=1. Then
p(m+c1)=(m+2c1)dm
If m+c1 and m had a common divisor, it would divide c1, a contradiction. So gcd(m,m+c1)=1. and similarly, gcd(m+c1,m+2c1)=1. Thus m+2c1 and m divide p, so m+2c1=p and m=1. Then m+c1=d so c⩾d=a+b. Now
xy=c(x+y)⩾(a+b)(x+y)=x2+y2
again a contradiction.
Alternative Solution by PSC:
Let d=gcd(x,y). Then x=da and y=db for some a,b such that gcd(a,b)=1. Then
d4(a4−b4)=pd3(a3−b3)
which gives
d(a+b)(a2+b2)=p(a2+ab+b2)
If a prime q divides both a+b and a2+ab+b2, then it also divides (a+b)2−(a2+ab+b2)=ab. So q divides a or q divides b. Since q also divides a+b, it must divide both a and b. This is impossible as gcd(a,b)=1. So gcd(a+b,a2+ab+b2)=1 and similarly gcd(a2+b2,a2+ab+b2)=1. Then (a+b)(a2+b2) divides p and since a+b⩽a2+b2, then a+b=1.
If a=0,b=1 then (∗) gives d=p and so x=0,y=p which is obviously a solution. If a=1,b=0 we similarly get the solution x=p,y=0. These are the only solutions.