Slide the dryer away from the wall and measure the length of the offset between the vent outlet and the wall inlet with a tape measure. The inlet can be offset in any direction -- it doesn't have to be above the dryer. Purchase a periscope long enough to span this distance.
Fit one end of the periscope around the dryer's exhaust vent. Wrap a metal pipe clamp around the pipe and tighten the clamp with a screwdriver. Extend the periscope to the appropriate length and adjust it so the outlet is aligned with the wall inlet.
Slide the dryer back against the wall after plugging it in and reconnecting the gas if necessary. As you slide the dryer, guide the periscope outlet onto the vent inlet. Once they are connected, and the dryer is in place, fit a clamp around the periscope outlet and tighten it with a screwdriver.