Need help understanding a relation between the fundamental forms
Notice that this equation is a $2$-dimensional phenomenon: it only holds on surfaces. In this case we can use the identities $\mathrm{tr} L = 2 H$ and $\det L = K$, where $H$ and $K$ are the mean curvature and the Gaussian curvature, respectively.
A straightforward verification can be done by computing the left hand side in a suitable basis and appealing to the tensoriality of all the terms. Clearly, at any point of the surface we can take a principal basis $\{e_1,e_2\}$ and compute $III - 2 H\, II + K\, I$ on all combinations $\{e_i,e_j\}$ for $i,j=1,2$ to see that this expression indeed vanishes (here I am following A.Gray et al., Modern Differential Geometry of curves and surfaces with Mathematica. Third Ed., p.403, see e.g.here).
Pretty similarly, W.Klingenberg in "A course in differential geometry", p.48, takes the quantity $IV:=(D \nu + \kappa_1 D f)(D \nu + \kappa_2 D f)$ and observes that $IV(e_1,X)=IV(X,e_2)=0$ for an arbitrary $X$ tangent to the surface. Expanding the definitions, one sees that $IV = III - 2 H\, II + K\, I$.
Another way is to observe that $III - \mathrm{tr}(L)II + \det (L)I$ is in fact the Cayley-Hamilton equation for the Weingarten operator $L$.
As an aside, I want to take the chance and continue the propaganda of the abstract index notation. I will derive this equation along with a particular case of the Cayley-Hamilton theorem, following M.Eastwood, "Invariant Theory in Differential Geometry", Proceedings of the Centre for Mathematics and its Applciations, 1994, pp.71-78, see here.
Since I have spent a bit of time explaining the abstract index notation on this site, see e.g. my answers here and here, I will use the conventions form those answers extensively. In particular, the tangent space $T_p S$ to the surface $S$ at a point $p$ will be denoted by $E^a$. The vector bundles are denoted by the same letters as the fibers, so, e.g., $E_a$ will mean both the cotangent space at some point, and the cotangent bundle.
Let us write the Weingarten operator as $L_a{}^b$, and notice that the third fundamental form can be presented as $III_{a b} = g_{c d} L_a{}^c L_b{}^d$, where $g_{a b}$ is the inner product in the tangent space of the chosen point. Also, we write $\mathrm{tr}L = L_a{}^a$. In fact, we use $g_{a b}$ and its inverse $g^{a b}$ tacitly to raise and lower indices ("musical isomorphisms"). Furthermore, $III_a{}^b = (L^2)_a{}^b$. The identity operator is presented by (the abstract-index version of) the Kronecker symbol $\mathrm{id}_a{}^b \equiv \delta_a{}^b$.
The Cayley-Hamilton theorem is equivalent to an obvious fact that on $n$-dimensional vector space all exterior forms of degree $> n$ vanish identically (the latter fact is collectively called the Cayley-Hamilton identity). Moreover, this holds for exterior forms with values in any vector space!
Consider $L_{[a}{}^d L_{b}{}^e \delta_{c]}{}^f \in E_{[abc]}\otimes E^{d e f}$, a $3$-form on $T_p S$ with values in $\otimes^3 T_pS$. From the Cayley-Hamilton identity, this form is identically zero if $\dim T_p S = 2$. In particular, all the traces of this quantity are zeroes!
Hopefully, the above paragraphs justify enough the following calculation. $$ \begin{align} 0_a{}^d & = 6 \, L_{[a}{}^b L_b{}^c \delta_{c]}{}^d\\ & = L_a{}^b L_b{}^c \delta_c{}^d + L_b{}^b L_c{}^c \delta_a{}^d + L_c{}^b L_a{}^c \delta_b{}^d - L_b{}^b L_a{}^c \delta_c{}^d - L_a{}^b L_c{}^c \delta_b{}^d - L_c{}^b L_b{}^c \delta_a{}^d \\ & = (L^2)_a{}^d + (\mathrm{tr}L)^2 \delta_a{}^d + (L^2)_a{}^d - (\mathrm{tr} L) L_a{}^d - (\mathrm{tr} L) L_a{}^d + (\mathrm{tr}L^2) \delta_a{}^d \\ & = 2 (L^2)_a{}^d - 2(\mathrm{tr}L)L_a{}^d + [(\mathrm{tr}L)^2 - \mathrm{tr}(L^2)]\delta_a{}^d \end{align} $$
Exercise. Show that $(\mathrm{tr}L)^2 - \mathrm{tr}(L^2) = 2\,\det L$ for any $2\times 2$-matrix $L$.