What is the simplest possible method for making a 3-D hollow pipe/duct out of two cubes in Blender? One example of what I'd like to achieve is shown above (I would like to do this many times and change the dimensions of the joined bodies). This question has been asked before. I have spent the last couple of days googling and trying to understand explanations, but either I get lost or nothing has worked for me. It seems like many of the available explanations are designed for 2-D and I can't extend them to my setup.
More detail: I have to use two cubes of different size to make a pipe/duct. I will have to do this many, many times, so would prefer to find a fast method. I can't eyeball/estimate anything about the fit or size or orientation of the cubes because I'm trying to make a geometry for use in a simulation. My problem is that when I join the cubes, I have a surface crossing the pipe/duct at the join (in the figure below, this surface is oriented the same way as the grid). I have tried using the "knife project" tool, but I don't have vertices in the right place to use it and can't figure out how to get them. In one online resource, someone mentioned a "Union" addon, but it doesn't appear in my list of add-ons.
Is there a simple way to do this? All I need to do is get rid of one surface of each cube and then join the cubes.