Answer
Condition 1: Probabilities should be between 0 and 1 (inclusive)
Since b > a:
$y=\frac{1}{b-a} \gt 0$
and $y=\frac{1}{b-a} \lt 1$, hence:
b-a > 0
Condition 2: Total probability should be equal to 1
P(a < x < b) = (b-a) x y
= b-a x $\frac{1}{b-a}$
= 1
Work Step by Step
as given above