The blue dot moves, I know its x and y coordinates, and I also know that that causes the red dot to move along the triangle's hypotenuse in such a way that the red dot's y coordinate is always equal to the blue dot's y-coordinate.
How do I calculate the x value of the red dot's coordinate?