Multiply out the bracket in (2), and substitute (1) into (2), to get
From (3) you can find p, and then from (1) you can find q. So that determines the coordinates of .
The procedure to find the location of is similar, except that this time we have to work in three dimensions rather than two. Let , with being the lengths of the edges . Then
Multiply out the brackets in (5) and (6), and substitute (4) into those equations to replace by . That will leave you with two linear equations for a and b, which you can solve. Finally, substitute these values for a and b into (4) to find c.