You may want to review factoring one-variable polynomials first.

If a polynomial looks like x2 − 5xy + 4y2, you can deal with it the same as if the ys weren't there. Just look for two numbers which multiply to 4 and add to −5. These are −1 and −4. So the answer is (xy)(x − 4y). (The first factor would be x − 1y, but of course 1y is the same thing as y.)