Let ℓ0 be the natural length and Y be Young's modulus, A the cross-sectional area. By Hooke's law, extension =YATℓ0, so the stretched length is ℓ=ℓ0+YATℓ0=ℓ0(1+YAT).
For the two cases: ℓ1=ℓ0(1+YAT1) and ℓ2=ℓ0(1+YAT2).
Let k=YAℓ0, so ℓ1=ℓ0+kT1 and ℓ2=ℓ0+kT2. From these two equations: ℓ2−ℓ1=k(T2−T1), giving k=T2−T1ℓ2−ℓ1.
Substituting back: ℓ1=ℓ0+T2−T1(ℓ2−ℓ1)T1, so ℓ0=ℓ1−T2−T1(ℓ2−ℓ1)T1=T2−T1ℓ1(T2−T1)−T1(ℓ2−ℓ1)=T2−T1ℓ1T2−ℓ2T1.
Therefore the natural length of the wire is ℓ0=T2−T1ℓ1T2−ℓ2T1.