x3+qx+r=0
y=kx⟹x=ky∴ replace x with ky in the given question
⟹(ky)3+q(ky)+r=0
⟹k3+qky2+ry3=0
⟹ry3+qky2+k3=0