Least Squares estimator proof using vector transpose

Hi, I'm not sure if this question should be in the pre-uni or uni section so any advice would be great. I'm having trouble understanding part of the proof I have been given for least squares estimators using vectors. Sorry I don't know how to symbolise a transpose on here so i'll write it in words, it says that

y(transpose)*y+beta(transpose)*x(transpose)*x*beta-beta(transpose)*x(transpose)*y-y(transpose)*x*beta=y(transpose)*y-2*y(transpose)*x*beta+beta(transpose)*x(transpose) *x*beta

so obviously beta(transpose)*x(transpose)*y is equal to y(transpose)*x*beta

but I don't know why.

If I transpose the whole of [beta(transpose)*x(transpose)*y] I get y(transpose)*x*beta

but I can't substitute this into the first equation because that doesn't have the transpose of [beta(transpose)*x(transpose)*y] just simply [beta(transpose)*x(transpose)*y] itself.

I think the problem is something to do with me not understanding transposes correctly but I'm not sure so any help would greatly be appreciated!

Thank you!