$f(x) = \begin{cases} \frac{4x^3}{15}, & 0\leq x\leq1, \\ ax+\frac{8}{15}, & 1\leq x\lt 2, \\ b-\frac{4|x-3|}{5}, & 2\leq x \lt 4 \\ 0, &\text{otherwise} \end{cases}$
How do you find the value of $a$ or $b$ here? I am aware that $P(a \leq X \leq b) = \int_a^bf(x)dx$, but how do I use this to solve for either variable?
Also would the cumulative distribution function of $f(x)$ for $2\leq x\lt3$ just be
$F(x) =\int_2^2ax+\frac{8}{15}dx+\int_2^3b-\frac{4|x-3|}{5}dx,\\$
You have two parameters ($a$ and $b$), so you need two conditions. The first one comes from the fact that for $x=1$ you must have:
$$ \frac{4}{15} = a + \frac{8}{15} $$ because the value $1$ belongs to both first and second case of the $f$ definition.
The second condition comes from the fact that $f$ is a probability density function and, as such, the integral of it in its domain must be 1:
$$ \int_0^4 f(x) dx = 1 $$ So you have two unknowns and two equations.