This question is taken from the 2008 AP Statistics free-response question
4) An experiment was conducted to study the effect of temperature on the reliability of an electronic device used in an undersea communications system. The experiment was done in a laboratory where tanks of seawater were maintained at either 10 degrees C, 30 degrees C, 50 degrees C, or 70 degrees C.
After the electronic devices were submerged in the tanks for 5,000 hours, each device was inspected to determine if it was still working. The following table provides information on the number of devices tested at each temperature and the number of working devices at the end of the 5,000-hour test.
You may assume that the result for any single device is not influenced by the result for any other device.
An estimate of the proportion of devices that would work after 5,000 hours of submersion in 40 degrees C seawater can be obtained by averaging the estimates at 30 degrees C and 50 degrees C. ’
Compute this estimate and the associated standard error.
I understand how to get the estimated proportion of $\hat{p}_{40} = \frac{42+21}{50+30}=0.7875$. This is the pooled estimate. However I am so confused about finding the standard error of this pooled estimate.
The solution says:
\begin{align} \operatorname{Var}\left(\frac{X_{30}+X_{50}}{n_{30}+n_{50}}\right) &= \frac{1}{80^2}(n_{30}p_{30}q_{30}+n_{50}p_{50}q_{50}) \\&= \frac{1}{80^2}\left(50\cdot\frac{42}{50}\cdot\frac{8}{50}+30\cdot\frac{21}{30}\cdot\frac{9}{30}\right) \\&=0.00203 \end{align}
standard error $=\sqrt{0.00203}=0.0451$
I'm trying to find a formula or something for finding the variance of this pooled estimate.
When I initially did this problem, I used the formula for the standard error of sample statistic:
$$s_{\hat{p_1}-\hat{p_2}}=\sqrt{\hat{p_c}(1-\hat{p_c})\left(\frac{1}{n_1}+\frac{1}{n_2}\right)}$$
where $$\hat{p_c}=\frac{X_1+X_2}{n_1+n_2}$$
When I use this formula, my answer is way off.
What is wrong with what I did and how should I approach such problems?
P.S. I also know that don't have to use the pooled proportion.

The misunderstanding here is that the estimate of the proportion of working devices at 40 C is not a pooled proportion. While it is true that the calculation of $\hat p_{40}$ happens to match that of a pooled proportion, the variance is not a pooled variance.
Let's try to understand why there is a difference. The meaning of "pooling" is to say, "I assume that the samples I pool together have come from the same underlying distribution." However, even if this is true, the sample proportions and sample variances are only estimates of the underlying parameter, hence cannot be expected to be equal. Therefore, under this distributional assumption, it makes sense to compute a pooled statistic in a way that reflects this belief that, despite differences in the observed within-group estimates, both samples are realizations from the same distribution.
But here, this is not the case because the purpose is not to find the standard error of the pooled data from both the 30 C and 50 C groups, but rather, to interpolate the data from these groups to infer the proportion surviving at an intermediate temperature. Thus the standard error of this point estimate is simply the square root of the variance of the estimator that was used.
That said, there is a very important point I wish to make here, which is that this choice of estimator $$\hat p_{40} = \frac{X_{30} + X_{50}}{n_{30} + n_{50}}$$ is, in my opinion, deeply flawed. There are two reasons. First, it is not at all obvious how you would modify this estimator if you wanted a survival proportion at a temperature not at the midpoint; e.g., how would you modify it for, say, 35 C, or 47 C? We could do a fully continuous linear interpolation, say $$\hat p_T = \frac{(1-\lambda)X_{30} + \lambda X_{50}}{(1-\lambda)n_{30} + \lambda n_{50}}$$ where $$\lambda = \frac{T-30}{50-30} \in [0,1],$$ but why? Is there a justification for this choice? There are other ways to interpolate.
But more problematic than the method of interpolation is the fact that this choice of point estimator is sensitive to differences in sample size. What I mean by this is that if $n_{30} \gg n_{50}$, e.g. $n_{30} = 100$ and $n_{50} = 5$, then you can immediately see that the "interpolated" proportion at 40 C would be overwhelmed by the relative abundance of data at 30 C, being almost equal to it, irrespective of the five data points at 50 C. This makes no scientific sense because if the proportion surviving at 50 C is substantially lower, despite the high uncertainty due to small sample size, you cannot simply ignore that, which is what this estimator does by weighting the interpolation by sample size. It would be better to choose the estimator $$\hat p_{40} = \frac{\hat p_{30} + \hat p_{50}}{2} = \frac{X_{30}/n_{30} + X_{50}/n_{50}}{2}.$$