PRECAUTIONS
First of all, you should check the triangle ineqalities:
$$
l_1+l_2>l_3;~l_2+l_3>l_1;~l_1+l_3>l_2;
$$
if at least one of them fails, your problem has no solution.
Also we assume, that $\sqrt{(b_x-a_x)^2+(b_y-a_y)^2}=l_1$, otherwise, your problem is contradictory.
HELPFUL FACT
If we have some ray, that makes angle $\varphi$ with $x$ direction, the unit vector along this ray has $(\cos\varphi;\sin\varphi)$ coordinates. This is valid for any direction of the ray.
SOLUTION
Let us designate the angle between ray $AB$ and $x$ direction by $\alpha$. Then:
$$
\cos\alpha=\frac{b_x-a_x}{l_1};~\sin\alpha=\frac{b_y-a_y}{l_1}.
$$
Let us designate $\angle CAB$ angle of the triangle by $\beta$. We'll use the law of cosines to calculate $\cos\beta$:
$$
\cos\beta=\frac{l_1^2+l_2^2-l_3^2}{2l_1l_2}
$$
$-1<\cos\beta<1$ ($\cos\beta$ may be positive, negative, or zero). $0<\beta<\pi$ (it is an angle in a triangle), so $\sin\beta>0$ ($\sin\beta$ may be only positive). Thus $\sin\beta$ is determined uniquely:
$$
\sin\beta=\sqrt{1-\cos^2\beta}.
$$
Let us calculate the angle between the ray $AC$ and $x$ direction (we'll call it $\gamma$). There are two possible positions of $C$ point (symmetric with respect to $AB$ line). So there are two possible $\gamma$ values:
$$
\gamma=\alpha+\beta~\text{or}~\gamma=\alpha-\beta.
$$
We can calculate $\cos\gamma$ and $\sin\gamma$ for each of this cases:
$$
\gamma=\alpha+\beta:\\
\cos\gamma=\cos(\alpha+\beta)=\cos\alpha\cos\beta-\sin\alpha\sin\beta\\
\sin\gamma=\sin(\alpha+\beta)=\sin\alpha\cos\beta+\cos\alpha\sin\beta\\
~\\
\gamma=\alpha-\beta:\\
\cos\gamma=\cos(\alpha-\beta)=\cos\alpha\cos\beta+\sin\alpha\sin\beta\\
\sin\gamma=\sin(\alpha-\beta)=\sin\alpha\cos\beta-\cos\alpha\sin\beta\\
$$
$(\cos\gamma;\sin\gamma)$ is the unit vector along the $AC$ ray direction. Now we get the coordinates of $C$ easily:
$$
c_x=a_x+l_2\cdot\cos\gamma;~c_y=a_y+l_2\cdot\sin\gamma.
$$
In my opinion, this solution is valid for any possible input data.