Trig : With point $(X,Y)$ and a end point $(x_2,y_2)$, work out the 2 angles So imagine your arm, you have a shoulder point be $X,Y (0,0)$ you have a angles off this, then you have a elbow point $(x_1,y_1)$ and another angles which ends at your hand.
If you know the arm length (4 and 4), you know your starting point $(0,0)$ and you want to get the hand to say $(6,2)$ is there some maths to work out what the angles at the elbow and shoulder should be?

 A: Draw a line from the origin to the hand, called the distance line, then you have (based on your image, I assumed $y = -2$):
$$
\begin{eqnarray}
l &=& 4 & \textrm{length of an arm segment} \\
d &=& \sqrt{x^2 + y^2} = 2\sqrt{10} & \textrm{distance from the origin to the hand} \\
\tan \theta_1 &=& \frac{y}{x} = -\frac{1}{3} & \textrm{angle between x-axis and distance line} \\
\cos \theta_2 &=& \frac{d/2}{l} = \frac{\sqrt{10}}{4} & \textrm{angle between distance line and arm} \\
\end{eqnarray}
$$
Express $\cos \theta_2$ in terms of $\tan$ and then apply the tangent sum identity to get the angle at the shoulder:
$$
\begin{eqnarray}
\tan \theta_2 &=& \frac{-\sqrt{1 - \cos^2 \theta_2}}{\cos \theta_2} &=& -\frac{\sqrt{15}}{5} & \textrm{negative in fourth quadrant} \\
\tan (\theta_1 + \theta_2) &=& \frac{\tan \theta_1 + \tan \theta_2}{1 - \tan \theta_1 \tan \theta_2} &=& -\frac{12 + 5\sqrt{15}}{21} & \textrm{tangent sum identity} \\
\theta_1 + \theta_2 &=& \arctan -\frac{12 + 5\sqrt{15}}{21} &\approx& -0.98 \, \textrm{rad}
\end{eqnarray}
$$
Apply the double angle formula to get the angles with the distance line at the shoulder and hand, then remains the angle at the elbow:
$$
\begin{eqnarray}
\cos 2\theta_2 &=& 2 \cos^2 \theta_2 - 1 &=& \frac{1}{4} & \textrm{double angle formula} \\
\theta_3 &=& \pi - \arccos \frac{1}{4} &\approx& 1.82 \, \textrm{rad} \\
\end{eqnarray}
$$
A: Another slightly more complicated approach would be to use a system of trigonometric equations. Let $a$ be the angle at the elbow from the x-axis to the hand, $b$ the angle at the shoulder from the x-axis to the elbow, $x$ the abscissa of the hand, $y$ the ordinate of the hand. Given $4$ is the length of an arm segment, we have these equations:
$$
4 \cos a + 4 \cos b = x \\
4 \sin a + 4 \sin b = y \\
$$
If we solve $a$, we have this equation where we use the positive $\arccos$ because the arm is assumed to bend upward at the elbow:
$$
P = \frac{x^2 + y^2 - 32}{32} \\
a = b + \arccos P \\
$$
If we solve $b$, we have this equation where we use the negative $\arccos$ because the arm is assumed to bend downard at the shoulder:
$$
Q = \sqrt{2(P + 1)} \\
b = \arccos \frac{\sqrt{1 - P^2}}{Q} - \arccos \frac{y}{4Q} \\
$$
If we plug these equations into SageMath with $x = 6$ and $y = -2$, we get the same angles as before:
sage: var('x', 'y')
sage: P = (x^2 + y^2 - 32)/32
sage: Q = sqrt(2*(P + 1))
sage: b = arccos(sqrt(1 - P^2)/Q) - arccos(y/(4*Q))
sage: a = b + arccos(P)
sage: n(b.subs(x=6,y=-2))
-0.980808590223051
sage: n((pi + b - a).subs(x=6,y=-2))
1.82347658193698

