If the variance of both gaussians is the same, the formula is:
T = (mean1 + mean2)/2 + (sigma^2)/(mean1 - mean2)*ln(weight1/weight2)
If the sigmas are different it is more difficult and I am in no condition to figure it out. I bet there are some people here that know.