I run the extension spanner inline with my torque wrench, and work it out as follows:
Torque Req'd (T) = 25Nm
Torque wrench length (L) = 260mm
Adapter Length (AL) = 45mm
Total length from handle centre to bolt centre = 305
Set torque = (TxL) / (L+AL)
= (25x260) / (260+45)
= 6500 / 305
= 21.3Nm
Like I said, this is with the adapter in line with the wrench. If the adapter is not in line then you'll have to start messing with trig, and I can't be bothered! Just keep it straight. Unless of course you turn it to 90 degrees in which case the trig will work out L=260mm (in my case) so I can just use 25Nm, but if the wrench slips away from 90 degrees to say 80 degrees it'll increase the torque at the nut and over tighten it.
Keep it straight and you can't over tighten it.