Find third point resulting in a right angle triangle with 2 known points

Hi, I want to find a point in 3d space ( Point C ) which creates right angle with point a and point b, as point a and point b are known and fixed so as the length x, Length Y is also fixed Hence the point c can lay on the grey circle maintaining the fixed distance form point b but also creating right angle triangle.
I think it is a mathf tan cos problem but dont know how to implement.
Points are Vector 3 in 3d space. Thankyou for your time to solve this question.

Here is the main solution:

        float radian =  Mathf.Asin(Y/X);
        Vector3 DirectionVector=(A-B).normalized;
        Vector3 NormalOfPlaneOfTriangle = known;
        DirectionVector = Quaternion.AngleAxis(-radian      

        //now the directionVector have the direction of (c-a).normalized where c is point to find
        //now we can project point b on DirectionVector

         Vector3 PointC = Vector3.Project((B-A),DirectionVector)+A;

Feel free to ask if there is any problem

You are overcomplicating this. Just use the the x value from point a and the y value from point b.

You are overcomplicating this. If static just use the the x value from point a and the y value from point b.

Edit : Sorry its late

If you are trying to find the point on the circumference dynamically it’s:
x = r * cos(theta) and y = r * sin(theta)