The point (2, 5) is not on the curve; probably you meant to say (2, -5)?
Consider an arbitrary point Q on the curve to the right of P, [tex](t,y(t))=(t,t^2-2t-5)[/tex], where [tex]t>2[/tex]. The slope of the secant line through P and Q is given by the difference quotient,
[tex]\dfrac{(t^2-2t-5)-(-5)}{t-2}=\dfrac{t^2-2t}{t-2}=\dfrac{t(t-2)}{t-2}=t[/tex]
where we are allowed to simplify because [tex]t\neq2[/tex].
Then the equation of the secant line is
[tex]y-(-5)=t(x-2)\implies y=t(x-2)-5[/tex]
Taking the limit as [tex]t\to2[/tex], we have
[tex]\displaystyle\lim_{t\to2}t(x-2)-5=2(x-2)-5=2x-9[/tex]
so the slope of the line tangent to the curve at P as slope 2.
- - -
We can verify this with differentiation. Taking the derivative, we get
[tex]\dfrac{\mathrm dy}{\mathrm dx}=2x-2[/tex]
and at [tex]x=2[/tex], we get a slope of [tex]2(2)-2=2[/tex], as expected.