Conditional expectation question I'm looking at question 4 section 3 from this problem set, bottom of page 2.
Repeated (more succinctly) here:

There is a prize $V \sim \text{Unif}[0, 1]$ measured in millions of dollars.
You can choose to bid any amount $b$ (in millions of dollars). If $b < \frac{2}{3}V$, then the bid is rejected and nothing is
gained or lost. If $b \geq \frac{2}{3}V$, then the bid is accepted and
your net payoff is $V-b$.
What is your optimal bid $b$ (to maximize the expected payoff)?

Let's call the payoff $X$.
I have solved this in two ways, both inspired by drawing a picture of the payoff. Sparing too many details one way it occurred to me to solve it was by calculating:
$$\int_0^{\frac{3b}{2}}(V-b) \, dV$$
but having read the solution (which I found confusing) I'm struggling to translate the above "intuitive" quantity into slightly more formal conditional expectation notation.
In other words: I knew that calculating the above (simple) integral was the right thing to do but unless I can formalise why it was a valid thing to do I'm wondering if it was an accident or not, and am unsatisfied.
So my question is: why is the expected payoff, $E[X]$, equal to the above integral?
 A: Note that, for a fixed $b$, $X$ is a function of $V$, and moreover it is completely determined by $V$. So I'll write $X(V)$ to clarify this fact.
By the law of the unconscious statistician,
$$E[X(V)] = \int X(v) f_{V}(v) \, dv,$$
where $f_{V}$ is the density of $V$. Plugging in the fact that this density is uniform over $[0,1]$, we have
$$E[X(V)] = \int X(v) f_{V}(v) \, dv$$
$$= \int_{0}^{1} X(v) \, dv$$
$$= \int_{\substack{b < \frac{2}{3} v\\ 0 \leq v \leq 1}} X(v) \, dv + \int_{\substack{b \geq \frac{2}{3} v\\ 0 \leq v \leq 1}} X(v) \, dv$$
$$ = \int_{\substack{\frac{3}{2} b < v\\ 0 \leq v \leq 1}} X(v) \, dv + \int_{\substack{\frac{3}{2} b \geq v\\ 0 \leq v \leq 1}} X(v) \, dv.$$
Assuming that $0 \leq \frac{3}{2} b \leq 1$ this becomes
$$ \int_{\frac{3}{2} b}^{1} X(v) \, dv + \int_{0}^{\frac{3}{2}b} X(v) \, dv,$$
which simplifies to
$$ \int_{\frac{3}{2}b}^{1} 0 \, dv + \int_{0}^{\frac{3}{2} b} (v-b) \, dv = \int_{0}^{\frac{3}{2} b} (v-b) \, dv $$
from the condition you provided governing the payoff.
Finally, we return to consider the case that $0 \leq \frac{3}{2} b \leq 1$ can be violated, in this case we have
$$\int_{0}^{\min\{1, \frac{3}{2} b\}} (v-b) \, dv$$
by similar reasoning.
