Let $B_t$ be a Brownian motion and let $\{\mathcal F_t : a<t<b\}$ be a filtration such that for each $t$ we have that $B_t$ is $\mathcal F_t$ measurable and for and $s<t$, the random variable $B_t-B_s$ is independent of the sigma field $\mathcal F_s$. Lastly let $L_{ad}^2[(a,b)\times \Omega]$ be this set of stocastic processes $f(t,\omega)$ such that $\int_a^bEf(s)^2 \, ds < \infty$ and $f(t,\omega)$ is adapted to the filtration $\mathcal F_t$
Consider $M_t$ = $\int_a^bf(s) \, dB(s)$. Then it is known that $M_t$ is a martingale and also $M_t^2$ is a submartingale. The Doob-submartingale decomposition says that there exists an increasing and right continuous random variable $\langle M \rangle_t$ such that $M_t^2- \langle M \rangle_t$ is a martingale. Find $\langle M \rangle_t$
I am told that $\langle M \rangle_t=\int_a^bf(s)^2ds$. Here is what I have done in order to show this.
Let $k<t$.
\begin{align*}& E\left[\left(\int_a^tf(s)\,dB(s)\right)^2 - \int_a^tf(s)^2 \, ds\mid\mathcal F_k\right] \\ &= E\left[\left(\int_a^kf(s)dB(s)+\int_k^tf(s)\,dB(s)\right)^2 - \int_a^tf(s)^2 \, ds\mid\mathcal F_k\right] \\ &= E\left[\left(\int_a^kf(s)\,dB(s)\right)^2+\left(\int_k^tf(s)\,dB(s)\right)^2 \mid \mathcal{F}_k \right] \\ &\quad +2 E\left[ \int_a^kf(s)\,dB(s)\int_k^tf(s)\,dB(s) - \int_a^tf(s)^2\,ds\mid\mathcal F_k\right] \\ &= \left(\int_a^kf(s)\,dB(s)\right)^2 - \int_a^kf(s)^2 \, ds \\ &\quad +E\left[\left(\int_k^tf(s)\,dB(s)\right)^2+2\int_a^kf(s)\,dB(s)\int_k^tf(s)\,dB(s) - \int_k^tf(s)^2 \, ds\mid\mathcal F_k\right] \end{align*}
where the last equality follows from the definition of our filtration. Now I'll focus on the remaining conditional expectation term. For the following I will use the independence of the increments of the Brownian motions and the fact that $E\left[\left(\int_a^bg(s) \, dB(s)\right)^2\right]=\int_a^bE(g(s)^2) \, ds$ and $E\left[\int_a^bg(s) \, dB(s)\right]=0$ I get
\begin{align*} &E\left[\left(\int_k^tf(s) \, dB(s)\right)^2+2\int_a^kf(s) \, dB(s)\int_k^tf(s) \, dB(s) - \int_k^tf(s)^2 \, ds\mid\mathcal F_k\right] \\ &= \int_k^tE(f(s)^2) \, ds +0-\int_k^tE(f(s)^2\mid\mathcal F_k) \, ds \end{align*}
Now putting everything together we see that
\begin{align*} &E\left[\left(\int_a^tf(s) \, dB(s)\right)^2 - \int_a^tf(s)^2 \, ds\mid\mathcal F_k\right] \\ &=\left(\int_a^kf(s) \, dB(s)\right)^2 - \int_a^kf(s)^2 \, ds + \int_k^tE(f(s)^2) \, ds -\int_k^tE(f(s)^2\mid\mathcal F_k) \, ds. \end{align*}
If the last two terms cancelled each other out, i.e. $$\int_k^tE(f(s)^2) \, ds =\int_k^tE(f(s)^2\mid\mathcal F_k) \, ds$$ then we would be done and we would then see that $$\int_a^tE(f(s)^2) \, ds -\int_a^tE(f(s)^2\mid\mathcal F_k) \, ds$$ is a martingale. But im not sure that these terms do cancel each other out. So did I make a mistake somewhere above?
When dealing with the remaining conditional expectation term, you forgot to take the conditional expectation of one ingredients, namely of
$$\left( \int_k^t f(s) \, dB_s \right)^2.$$
In your calculation you seem to use that
$$\mathbb{E} \left( \left[ \int_k^t f(s) \, dB_s \right]^2 \mid \mathcal{F}_k \right) = \mathbb{E} \left( \int_k^t f(s)^2 \, ds \right)$$ but this fails to hold true; it should read $$\mathbb{E} \left( \left[ \int_k^t f(s) \, dB_s \right]^2 \mid \mathcal{F}_k \right) = \mathbb{E} \left( \int_k^t f(s)^2 \, ds \mid \color{red}{\mathcal{F}_k} \right)$$
instead, see this question for a proof. Fixing this mistake will immediately solve your problem.