Let us do this step by step:
First calculate the derivative with respect to $\dot\theta$ (treating $\theta$, $\phi$ and $\dot\phi$ as independent variables)
$$\frac{\partial \cos(\theta - \phi)\dot \theta \dot\phi}{\partial \dot\theta}
=\cos(\theta - \phi) \dot\phi.$$
Next, we take the derivative with respect to time. Here, you should use the chain rule which states that
$$\frac{d}{dt} f(\theta,\phi,\dot \theta, \dot \phi) =(\partial_\theta f)\dot \theta+
(\partial_\phi f)\dot \phi + =(\partial_{\dot\theta} f)\ddot \theta+
(\partial_{\dot\phi} f)\ddot \phi.$$
Thus, we obtain
$$ \frac{d}{dt} \cos(\theta - \phi) \dot\phi
= \sin(\phi-\theta) \dot\phi (\dot\theta -\dot \phi) + \cos(\theta -\phi) \ddot\phi$$
so your result is correct... Only when $\dot \theta=0$, the other result is obtained.