I am working on firmware for a robot arm. I need to move the robot in the X direction by any given number. In this example, the arm is being moved by 10cm. Here is a diagram of it:
In the diagram, I only know the angles of the red line, which in this example is all 80 degrees.
The red line is the current position, and the blue line is the position that the arm will be moved to.
In the image, notice the large green arrow pointing to side 'a'. I need to solve this.
I made this sketch in Fusion 360, so I know that the answer is 111.937cm.
I tried doing 90cm plus the distance being moved (10cm). I also tried 90cm plus the X-pos. But this of course does not work.

The robot arm has a home position, and it will be moved home every time it turns on. The home function always sets all the angles to 90 degrees:
The problem I face is calculating the X distance is when the Y position is not 90 degrees (and vice versa). So, I can simply save this distance in a variable called 'Xvar'.
Here's the math:
Here's the triangle to solve:
In the image, you can see that you can solve side 'a' by doing:
Then save side 'a' in Xvar:
From there, you can finish solving the triangle, and then the rest of the MoveX function.
I use this website to help solve triangles:
https://www.mathsisfun.com/algebra/trig-solving-triangles.html
Basically, I was overthinking this.