Solution (source code)

= Solution

Assume $a<b$. An increasing <affine map> sends the two endpoints to zero and one when $ca+d=0$ and $cb+d=1$. Solving gives
$$
\boxed{c=\frac1{b-a},\qquad d=-\frac a{b-a}.}
$$
Indeed, for $0\leq t\leq1$, the <cumulative distribution function> of the transformed <random variable> is
$$
\mathbb P\left(\frac{V-a}{b-a}\leq t\right)=\mathbb P(V\leq a+(b-a)t)=\frac{a+(b-a)t-a}{b-a}=t,
$$
which is the <cumulative distribution function> of the <continuous uniform distribution> on $[0,1]$.

A decreasing <affine map> works too, by swapping the endpoints:
$$
\boxed{c=-\frac1{b-a},\qquad d=\frac b{b-a}.}
$$
These are the two possible choices, since the image interval must have endpoints zero and one. The case $a=b$ cannot be transformed into a nondegenerate <continuous uniform distribution> by deterministic constants.