see post #2 here
as in you are having trouble with completing the square, or did you not know that is what you are supposed to do?
for the first, complete the square for y on the right side
for the second, write as
now complete the square for x and y separately within the relevant brackets
can you finish?