How do I derive this formula from gauge theory? This is Exercise 3.4.14 in R. W. Sharpe's Differential Geometry.

Suppose $G$ is a Lie group with Lie algebra $\mathfrak{g}$ and $H$ is a Lie subgroup of $G$. Let $\theta$ be a $\mathfrak{g}$-valued $1$-form on a manifold $M$ and let $k:M\to H$. Then, $$\mathrm{d}\!\left(\mathrm{Ad}_k^{-1}\theta\right)=\mathrm{Ad}_k^{-1}(\mathrm{d}\theta)-[\mathrm{Ad}_k^{-1}\theta,k^*\omega_H],$$ where $\omega_H$ is the Maurer-Cartan form on $H$ and $\mathrm{Ad}_k^{-1}\theta(X)=\mathrm{Ad}_k^{-1}(\theta(X))$. In other words, for vector fields $X,Y\in\Gamma(TM)$, $$\mathrm{d}\!\left(\mathrm{Ad}_k^{-1}\theta\right)(X\wedge Y)=\mathrm{Ad}_k^{-1}(\mathrm{d}\theta(X\wedge Y))-[\mathrm{Ad}_k^{-1}(\theta(X)),L_{k\,*}^{-1}k_*Y]-[L_{k\,*}^{-1}k_*X,\mathrm{Ad}_k^{-1}(\theta(Y))].$$

I've managed to reduce this to $$\mathrm{Ad}_k\!\left(X(\mathrm{Ad}_k^{-1}\theta(Y))-Y(\mathrm{Ad}_k^{-1}\theta(X))\right)=X(\theta(Y))-Y(\theta(X))-[\theta(X),R_{k\,*}^{-1}k_*Y]-[R_{k\,*}^{-1}k_*X,\theta(Y)],$$ but I'm not sure whether this is even helpful.
Can anyone suggest how to prove this?
Sharpe goes on to say that this exercise is "fundamental for the elementary properties of Cartan gauges," so I'm including the gauge-theory tag.
 A: Okay, let's see. We'll start off with vector fields $X$ and $Y$ and the formula
$d\{Ad(k^{-1})\theta\}(X,Y)=X(Ad(k^{-1})\theta(Y))-Y(Ad(k^{-1})\theta(X)-Ad(k^{-1})(\theta([X,Y]))$,
which is standard.
All the action is in the first two terms, and by symmetry we only need to look at $X(Ad(k^{-1})\theta(Y))$.
We begin by noting we have a product rule:
$X(Ad(k^{-1})\theta(Y))=X(Ad(k^{-1}))(\theta(Y))+Ad(k^{-1})(X(\theta(Y)))$.
If you feel queasy about why that's true, pick a basis for $\mathfrak{g}$ and realize all you're doing is differentiating matrix multiplication. Another potential reason to feel disconcerted is the expression $X(Ad(k^{-1}))$, which starts making sense when you think of $Ad(k^{-1})$ as living in the vector space of all linear transformations of $\mathfrak{g}$.
The only antagonistic term above is $X(Ad(k^{-1}))$, which is the same as $Ad(k^{-1})_*(X)$ (the push-forward of $X$) since the linear transformations of $\mathfrak{g}$ are a vector space. We'll work this push-forward out at a fixed point $x\in M$, first noting that $Ad(k^{-1})=Ad(\iota\circ k)$ where $\iota$ denotes inversion in $H$.
$Ad(k^{-1})_{*x}(X)=Ad_{*k(x)^{-1}}\iota_{*k(x)}(k_{*x}(X))$
Call $k_{*x}(X)=\xi=\xi_{k(x)}$. We need to know what $\iota_{*h}\xi$ works out to be. Well, $\xi_{h}$ generates a left-invariant vector field whose value at $e\in H$ is $\omega_H(\xi_h)$, so $\xi_h=\displaystyle\frac{d}{dt}\big|_{t=0}h\exp(t\omega_H(\xi_h))$, and thus
$\iota_{*h}\xi=\frac{d}{dt}\big|_{t=0}(h\exp(t\omega_H(\xi_h)))^{-1}=\frac{d}{dt}\big|_{t=0}\exp(-t\omega_H(\xi_h))h^{-1}=\frac{d}{dt}\big|_{t=0}h^{-1}h\exp(-t\omega_H(\xi_h))h^{-1}=\frac{d}{dt}\big|_{t=0}h^{-1}\exp(-tAd(h)\omega_H(\xi_h))=(L_{h^{-1}})_*(-Ad(h)(\omega_H(\xi_h)))$
(This is what Prop. 3.4.10 (ii) of Sharpe's book says.)
Okay, so where are we? We have
$Ad(k^{-1})_{*x}(X)=Ad_{*k(x)^{-1}}(L_{k(x)^{-1}})_*(-Ad(k(x))(\omega_H(\xi)))=Ad_{*k(x)^{-1}}(L_{k(x)^{-1}})_*(-Ad(k(x))(k^*\omega_H(X)))$
We're pretty close. Call $-Ad(k(x))(k^*\omega_H(X))=\eta$. What we need to compute is $Ad_{*}(L_{g^{-1}})_*(\eta)$:
$Ad_{*}(L_{g^{-1}})_*(\eta)=\frac{d}{dt}\big|_{t=0}Ad(g^{-1}\exp(t\eta))=Ad(g^{-1})\frac{d}{dt}\big|_{t=0}Ad(\exp(t\eta))=Ad(g^{-1})[\eta,\cdot]=[Ad(g^{-1})\eta,Ad(g^{-1})(\cdot)]$
Now substitute $g=k(x)$ and that cumbersome expression for $\eta$ and we find that
$Ad(k^{-1})_{*x}(X)=Ad_{*k(x)^{-1}}(L_{k(x)^{-1}})_*(-Ad(k(x))(k^*\omega_H(X)))=[Ad(k(x)^{-1})(-Ad(k(x))(k^*\omega_H(X))),Ad(k(x)^{-1})(\cdot)]=-[k^*\omega_H(X)),Ad(k(x)^{-1})(\cdot)]$
Putting this all together we have
$X(Ad(k^{-1}))(\theta(Y))=-[k^*\omega_H(X)),Ad(k(x)^{-1})(\theta(Y))]=[Ad(k(x)^{-1})(\theta(Y)),k^*\omega_H(X))]$
which leads to the final computation:
$d\{Ad(k^{-1})\theta\}(X,Y)=X(Ad(k^{-1})\theta(Y))-Y(Ad(k^{-1})\theta(X)-Ad(k^{-1})(\theta([X,Y]))=X(Ad(k^{-1}))(\theta(Y))+Ad(k^{-1})(X(\theta(Y)))-(Y(Ad(k^{-1}))(\theta(X))+Ad(k^{-1})(Y(\theta(X))))-Ad(k^{-1})(\theta([X,Y]))=[Ad(k(x)^{-1})(\theta(Y)),k^*\omega_H(X))]-[Ad(k(x)^{-1})(\theta(X)),k^*\omega_H(Y))]+Ad(k^{-1})(d\theta)(X,Y)=Ad(k^{-1})(d\theta)(X,Y)-[Ad(k(x)^{-1})\theta,k^*\omega_H](X,Y)$
which is what we wanted to prove.
A: The crucial step towards this is differentiating the function $f:M\to GL(\mathfrak g)$, which maps $x$ to $\text{Ad}(k(x))^{-1}$. To do this, observe first that by definition $T_xk\cdot\xi$ equals the value in $k(x)$ of the left invariant vector field generated by $X:=(k^*\omega_H)(\xi)(x)$. Using this, you see that $T_xf\cdot\xi$ can be computed as the derivative at $t=0$ of the curve $\text{Ad}(k(x)exp(tX))^{-1}=e^{t\text{ad}(X)}\circ\text{Ad}(k(x))^{-1}$. Hence you see that $T_xf\cdot\xi=-\text{ad}(X)\circ\text{Ad}(k(x))^{-1}$. 
Now if you insert the definition of the exterior derivative, you first get a term $\xi\cdot(f(x)(\theta(\eta)(x)))$ and you can expand this as $(T_xf\cdot\xi)(\theta(\eta)(X))+f(x)((\xi\cdot\theta(\eta))(x))$. Then you have to subtract the same term with $\xi$ and $\eta$ exchanged and finally subtract $f(x)(\theta([\xi,\eta])(x))$. Now the three terms in which values of $\theta$ are differentiated add up to $f(x)(d\theta(\xi,\eta))$, so these produce the first term in the claimed formula. For the remaining two terms, the above computation gives $-[(k^*\omega_H)(\xi)(x),f(x)(\theta(\eta)(x))]+ [(k^*\omega_H)(\eta)(x),f(x)(\theta(\xi)(x))]$, these exactly correspond to the second term.  
