Question:

Factor x2 + 2xy + y2

Answer:

(x + y) (x + y), which is the same as

(x + y)2

Check it by multiplying it out, and you'll see it's right.