I don't know if this has been asked before, but I could not find any existing answer.
I noticed that for any pair of primitive pythagorean triples (not necessarily distinct), let's say:
a² + b² = c²
d² + e² = f²
Then there is at least another primitive triple where:
g² + h² = (cf)²
And there are 2 if the starting triples are distinct.
So, for example:
(3,4,5) and (5,12,13) -> (16, 63, 65) and (33, 56, 65)
(5,12,13) and (8,15,17) -> (21, 220, 221) and (140, 171, 221)
(3,4,5) (5,12,13) (8,15,17) -> (817,744,1105) (943,576,1105) (1073,264,1105) (1104,47,1105)
(3,4,5) and (3,4,5) -> (7,24,25)
I think there is an explanation for that, a property of pythagorean triples, or in general of diophantine equations.
Is it true in every case? Is there a way to calculate the two legs of the resulting triple(s)?