if x+y = 3 then (x+y)^2 = 3^2 = 9. Since (x+y)^2 is really x^2 + 2xy + y^2, then x^2 + 2xy + y^2 = 9. When you rearrange the terms on the left, you have x^2 + y^2 + 2xy = 9.
We also know that x^2 + y^2 = 8 (given to us by the problem). So we can substitute this into our equation above:
8 + 2xy = 9
Thus 2xy = 1 and so xy = 1/2.