How can I find the third set of coordinates (X3 Y3) of right angle triangle based on the distances between all coordinates and the other two set of coordinates (X1 Y1; X2 Y2)

Code:
clc;
clear all;
close all;
axis on;
%Example of initial parameters
X1 = 0
Y1 = 2
X2 = 6
Y2 = 7
DX2Y2X3Y3 = 10
%Draw line
line([X1, X2], [Y1, Y2])
text(X1,Y1-0.05,strcat(string(X1),",",string(Y1)))
text(X2,Y2-0.05,strcat(string(X2),",",string(Y2)))
%Calculations
DX1Y1X2Y2 = sqrt((X2-X1)^2+(Y2-Y1)^2) %distance x1,y1 x2,y2
DX1Y1X3Y3 = sqrt(DX2Y2X3Y3+DX1Y1X2Y2)%distance x1,y1 x3,y3 based on Pythagoras
