What substitution were you thinking? I would expand the 2nd set and rewrite in terms of exponentials and solve for them.
a,b,x,y,l1,l2=symbols('a b x y l1 l2')
eq = [l1*cos(a)+l2*cos(a+b)-x,l1*sin(a)+l2*sin(a+b)-y]
eq=[i.expand(trig=1).rewrite(exp).subs(exp(I*a),var('A')).subs(exp(I*b),var("B")).as_numer_denom()[0] for i in eq]
g = groebner(eq,(A,B))
solve(g,(A,B),simplify=0,verify=0)
which gives 3 solutions (but the one with A=0 is not valid, so just 2)
/c