your way looks correct as well. The plots of your function and wolfram's integral lie on top of each other.

I have to say though that this is clearly a partial fractions problem and not a trig substitution problem even if you can find an substitution that works.

$x^2-6x+5=(x-5)(x-1)$ so a bit of work shows

$\dfrac{1}{x^2-6x+5}=\dfrac{1}{4}\left(\dfrac{1}{x-5}-\dfrac{1}{x-1}\right)$

and the integral pops right out.