That is too lengthy!
For how many values of k can this be factored into linear functions of x and y?
f(x,y) = (k-1)(-6+x-y)^3 - k^2(-6+x-y)(12+4y-4x-xy) + k^3 (-8+4x-4y+2xy)
Reminder: Linear functions are of form ax+by+c
That is write
f = (L1)(L2)....(Ln) where L is linear in x and y if possible
You're a genius if you can do this without use of computers.