The law of cosines solves the elbow
For a triangle with sides L1, L2 and d, the law of cosines says d squared equals L1 squared plus L2 squared minus 2 L1 L2 times the cosine of the angle between the booms. Rearranged, the elbow bend from straight is the arccosine of (d squared minus L1 squared minus L2 squared) divided by (2 L1 L2).
The shoulder angle is the target direction plus the angle whose tangent is L2 sin(bend) divided by (L1 plus L2 cos(bend)). Flip that sign and you get the elbow down answer, which reaches the same point with the elbow below the line.
Why seven joints, if two do the reaching
Two planar joints fix where the wrist goes. Three wrist joints then set the payload's orientation, and the extra seventh joint gives a free choice of which plane the booms swing in, which helps the arm avoid hitting structure and avoid singular poses. Operators often lock one joint and solve the remaining six.
This is a teaching model: it treats the arm as two booms in one plane, measures the target from the shoulder pitch joint to the wrist, and keeps the payload level by setting the wrist pitch to cancel the other two angles.