I ran into a problem I am unable to solve while constructing a simplish robot with two arms connected in a row. It is simple to find what point the arms will reach given the angles.
Lengths of the arms $a, b$ are constant. Angles $\alpha, \beta$ are variables.
$$\begin{align} x &= a\cos(\alpha ) + b\cos(\alpha + \beta)\\ y &= a\sin(\alpha ) + b\sin(\alpha + \beta) \end{align}$$
I would like to calculate the opposite of this: $\alpha$ and $\beta$ given $x$ and $y$.
I believe this can have 0-2 solutions, but that is about as far as I got. Any help would be awesome, a complete solution even better. This is not homework, just a project of mine.

Here are a few pointers.
In my diagram, you can see that the direction angle for vector $\overrightarrow B$ is not $\alpha+\beta$ but rather $\alpha+\beta-180°$. This changes the sign of your second term in the formulas, giving
$$x=a\cos(\alpha)-b\cos(\alpha+\beta)$$ $$y=a\sin(\alpha)-b\sin(\alpha+\beta)$$
$$c^2=a^2+b^2-2ab\cos\beta$$
so
$$\beta=\cos^{-1}\left(\frac{a^2+b^2-c^2}{2ab}\right)$$
We see that $\alpha=\gamma+\delta$, so we want to find $\gamma$ and $\delta$.
We can find $\gamma$ with
$$\gamma=\operatorname{atan2}(x,y)$$
where atan2 is the arctangent function with two arguments. If you don't like atan2, you can use
$$\gamma=\tan^{-1}\left(\frac yx\right)$$
though that does not quite work correctly for $x\le 0$. The linked article for atan2 explains how to calculate atan2 if it is not in your toolkit.
$$\delta=\cos^{-1}\left(\frac{a^2+c^2-b^2}{2ac}\right)$$
You can tell if there is no solution if you get a "domain error" when finding the arccosines: i.e. you attempt to find the arccosine of a value outside the interval $[-1,1]$. This will happen when $c$ is outside the interval $[|a-b|,a+b]$.
You can tell is there is one solution if $\beta=0°$ or $\beta=180°$.
These calculations only give you one of the solutions, if there are two solutions. I'll leave it to you to figure how to correct the orientations to get the other solution.
There is a singularity in my calculations when $a=b$ and the object is at the origin. In particular, both atan2 and atan fail at $x=y=0$. You would need to take that into account in a real solution.
You do not state the range of possible values for $\alpha$ or $\beta$, though given your diagram you probably want $0°\le\beta<360°$. The range for $\alpha$ could be $[0°,360°)$ or $(-180°,180°]$. In your final solution you will probably need to adjust your answers to stay in the desired ranges.