How to show that $E(g(X, m, s)) = 0$ for a random variable $X$ iff $m = E(X)$ and $s = var(X)$?
The broader question and definition of $g$ is this:

How to show that $E(g(X, m, s)) = 0$ for a random variable $X$ iff $m = E(X)$ and $s = var(X)$?
The broader question and definition of $g$ is this:

Copyright © 2021 JogjaFile Inc.
It looks like a simple substitution, First line $E(X-m)=\mu-m$. second line for $m=\mu$, then $E((X-m)^2-s)=\sigma^2-s$