We can find the edge length of the triangle, see this thread.
My approach for the triplets are to find a $90° + 60°$ i.e. see $△XPB$ ,
$∠XPB = 90$ & $∠APX = 60°$.
Image
Followed by using the cosine formula in $△APB$ , i.e. $AB = \sqrt{AP^2 + PB^2 - 2AP⋅PB⋅cos(∠APB)}$
But then I got stuck...
Also I would like to generalize this for any Pythagorean Triplet.