As stated in the question, the equation for the deflection curves for the intervals $0<x<a$ and $a<x<L$ are given as
The maximum deflection in the beam can occur either to the left of the load or to the right, and we don't know what is the case here.
Let us start off by assuming the maximum deflection was in the portion $0<x<a$. If that were to be true then at some x lying between 0 to a the slope of the deflection curve for $0<x<a$ would've been zero. That x at which slope would've been zero can be determined by differentiating the equation for deflection curve for $0<x<a$ and then setting it to 0. This would give us,
$$x= \sqrt{\frac{L^2 - b^2}{3}}$$
If this indeed is the value of x, at which the deflection is maximum and if it occurs in $0<x<a$, then $x<a$. If x turns out to be greater than a, that would mean this result is not feasibe. Let us try to investigate whether this x is greater than or less than a.
$$x= \sqrt{\frac{L^2 - b^2}{3}}$$
$$x= \sqrt{\frac{a^2+2ab}{3}}$$
$$\sqrt\frac{a^2+2a.a}{3} > \sqrt\frac{a^2+2ab}{3}$$
$$a > \sqrt\frac{a^2+2ab}{3}$$
$$a > x$$
The value of x, indeed is in the interval 0<x<a. Thus, our assumption was right and the maximum deflection does occur in the region 0<x<a. To find this deflection we can substitute $$x= \sqrt{\frac{L^2 - b^2}{3}}$$
in the equation of the deflection curve for $0<x<a$
We could extend the analysis and disprove that the maximum deflection occurs in the interval $a<x<L$. In the same manner, we can first assume that the max deflection was occurring in the portion $a<x<L$, then we can determine the x at which it would've occurred (if it would've occurred), by differentiating and putting to 0, the equation of the deflection curve for $a<x<L$.
The equation thus obtained will be a qaudratic one, which has solutions
The second value of x is greater than L, hence this is not a feasible solution. Also, by using inequalities we can prove that the first value of x, will be <a. Since this value is <a, we conclude that even the first value of x in the solution above is not feasible since x should occur between $a<x<L$ if the max deflection were to truly occur in the region $a<x<L$.
Here is a plot of the deflection curves for a 6m length of the beam-