Let $f$ and $g$ be integrable on $[a,b]$. We want to prove that :
For any non-decreasing $h$, $\int_a^b fh \ dx \le \int_a^b gh \ dx$ iff $\int_a^x g \le \int_a^x f$ and $\int_a^b g = \int_a^b f$.
I put $F(x) = \int_a^x g - \int_a^x f \le 0$ so $F(b)=0$, but it is strange how multiplication by non-decreasing h cause reversing the inequality! With a small hint also I would be very grateful for I have a mental block with this and cant make no progress at all.
Hint:
The implication $\Rightarrow$ is straightforward, consider the reserve sense $\Leftarrow)$.
Assume $h$ is now right continuous, then there is a bounded positive measure $\nu$ on $([a,b], \mathbb{B}([a,b]))$ such that $h(t)=\nu([a,b])$. Let $G(t)=\int_{t}^b (g-f)$, by Fubini's, the ineq $0 \le \int_a^b (g-f)h$ is equivalent to say that (why?): $$0 \le \int_a^b Gd\nu$$ which is true (why?). Now, if $h$ is no longer right continuous, why we can use the above result to prove the inequality?