Solution (source code)

= Solution

The <martingale product identity> says that $N_tK_t-[N,K]_t$ is a <martingale>. Passing to the terminal values of the square-integrable martingales and using $N_0=K_0=0$ gives
$$
\mathbb E[N_\infty K_\infty]=\mathbb E[N,K]_\infty.
$$
The <quadratic covariation> identity for a <stochastic integral> is
$$
[H\mathbin\cdot M,K]_t=\int_0^tH_s\,d[M,K]_s.
$$
Applying the same product identity to $H\mathbin\cdot M$ and $K$ therefore gives
$$
\mathbb E[(H\mathbin\cdot M)_\infty K_\infty]=\mathbb E[H\mathbin\cdot M,K]_\infty.
$$