Combining Two Rectangular Tubes

Rectangular Tube Test.shapr (17.8 MB)

Good day. Is there a method of combining these two rectangular tubes to obtain one (1) L shaped object. Ideally the method would place the horizontal object at any location on the vertical object and then combine and remove the unused portion.