In general, the function $g$ is not even continuous. E.g., let $A=2$$A=4$ and $f(x)=x$ for all $x$. Let $X$ be uniformly distributed on $[0,A]=[0,2]$$[0,A]=[0,4]$. Then $Ef(X)=2$ and $$g(x)=\frac{1(x\le1)}{1+1(x\le1)},$$ so that $g$ is discontinuous at $1$$1\in[0,2]=[0,Ef(X)]$.