y^2-5y over y^2-7y+10 What did I do wrong.. for my answer i got (y+5) over (y-2) and the correct answer is y over (y-2)???

How would you do this problem?
3x over x+1 = ? over x^2-x-2

2 answers

1) y(y-5)/(y-5)(y-2)= y/(y-2)
I don't understand how you got to that answer