There's a lot going on here; let's take it step by step. I'm assuming that the task is to simplify $$\frac{x^2+xy}{y^2+xy}$$.
I have been taught to cancel out like terms, so can't i say, "xy over xy = 1, ...
It sounds like you are trying to do this:
$$ \frac{x^2 \color{red}{+xy}}{y^2 \color{red}{+ xy}} \color{red}{=} \frac{x^2}{y^2}$$
This is wrong. You can cancel common factors in the numerator and denominator but not common terms. If you try it with $x=1$ and $y=2$, then the left-hand side of the above is $\frac{1^2 + 1 \cdot 2}{2^2 + 1 \cdot 2} = \frac{3}{6} = \frac{1}{2}$, while the right-hand side is $\frac{1^2}{2^2} = \frac{1}{4}$.
x^2 over y^2 is simply X x X and Y x Y, so i can divide those by top and bottom and get answer = 1"
It sounds like you are trying to do this:
$$
\frac{x^2}{y^2} \color{red}{=} \frac{x^2 /x^2}{y^2/y^2} = \frac{1}{1}
$$
This is also wrong. You can only divide the top and bottom by the same expression, not different ones.
and ultimately end up with nothing as the answer?
It sounds like you are equating the $1$ that arrives from canceling everything in sight with $0$ (“nothing"). But a multiplicative nothing is $1$, while $0$ is the additive nothing.
OK, then, turning to your question about the solution which is correct:
why is that ...if i write them out as x(x+y) over x(x+y) i can then cancel out the terms in the brackets?
You have
$$
\frac{x^2+xy}{y^2+xy} = \frac{x\color{blue}{(x+y)}}{y\color{blue}{(y+x)}} = \frac{x}{y}
$$
Here we see common factors in the numerator in denominator, so they can be canceled. But there isn't anywhere to go from here, since $x$ and $y$ are independent variables.