The 3,4,5 rule is just an example, but you can use the same rule for any lengths really as long as they met the conditions for a triple if that is the way you wanted to do it in the field quickly.
Another option would be to just use Pythagorean's theorem of a^2 +b^2 = c^2 for the lengths you gave.
e.g. 30^2 + 25^2 = 1525, sqrt(1525) = ~39' 5/8", so measuring from the tip of each pipe should be just under 39' 5/8".
The link explains it all in detail.
https://en.wikipedia.org/wiki/Pythagorean_triple or
https://en.wikipedia.org/wiki/Pythagorean_theorem