Using the scalar product, notice that
$$(x_1-x_2)(x_3-x_2)+(y_1-y_2)(y_3-y_2) = L_1 L_2 \cos \theta$$
and
$$(x_1-x_2)(x_4-x_2)+(y_1-y_2)(y_4-y_2) = L_1 L_2 \cos \theta \; .$$
as well as equations related to the length
$$(x_3-x_2)^2+(y_3-y_2)^2 = L_2^2$$
and
$$(x_4-x_2)^2+(y_4-y_2)^2 = L_2^2$$
You can thus solve these equations in $(x_3,y_3)$ and $(x_4,y_4)$. Note that they really are the same pair of equations (eq 1 & eq 3 w.r.t. eq 2 & eq 4) which means that those equation have 2 solutions which are related to different possible orientations of your angles $\theta$. You can filter out which solution is which by looking at their location with respect to $(x_1,y_1)$ and $(x_2,y_2)$.
Let me expand a bit on the answer. So my equations are
$$(x_1-x_2)(x-x_2)+(y_1-y_2)(y-y_2) = L_1 L_2 \cos \theta$$
and
$$(x-x_2)^2+(y_3-y_2)^2 = L_2^2$$
Now, introduce $(x-x_2)=X$ and $(y-y_2)=aX$. The equations become
$$(x_1-x_2)X+(y_1-y_2)aX = L_1 L_2 \cos \theta$$
and
$$X^2+a^2X^2 = L_2^2$$
The first equation gives
$$X = \frac{L_1 L_2 \cos \theta}{(x_1-x_2)+(y_1-y_2)a}$$
which you can substitute in the second to give an equation of second degree in $a$ only.
$$(1+a^2)(L_1 L_2 \cos \theta)^2 = L_2^2 ((x_1-x_2)+(y_1-y_2)a)^2$$
This will have two solutions for $a$.