tan(θ-π/4)=(tanθ-tan(π/4)/(1+tanθtanπ/4)=
(tanθ-1)/(1+tanθ).
In a right triangle with hypotenuse length 13 and a leg length of 5, the other leg has a length √(13²-5²)=√144=12. In this triangle, when sinθ=5/13 (opp/hyp) then tanθ=opp/adj=5/12.
Therefore tan(θ-π/4)=(5/12-1)/(1+5/12)=(-7/12)/(17/12)=-7/17.