Triangle Prism 1 (TP1) has base of 24 feet, height of 16 feet and length of 20 feet.

Triangle Prism 2 (TP2) has base of 24 feet, height of 9 feet and length of 30 feet.

TP2 intersects TP1 at mid span of TP1 at a 90 degree angle.

So what is the line length (4 total should be the same each) where they intersect at an angle?

Please provide a formula so I can use it with various Triangle Prism sizes.

Also how would the formula change for different angles of intersection?Thanks in advance for your help.