A gas canister being carried on one of the lorries started to "vent off" gas after the collision on the A483 at Berriew, near Welshpool, and had to be isolated by firefighters at the scene.
Firefighters also made sure the other canisters in the load were safe and not at risk of exploding.
One of the lorries left the road while the gas canisters being carried by the other spilled across the road.
The crash, which happened at about 2.30pm on Monday , closed the road for almost seven hours while the scene was cleared, and diversions were put in place.
Firefighters from Welshpool, Montgomery and Newtown worked to release the trapped driver from the wreckage of his cab.
The other driver is thought to have been unharmed. Police closed the road – one of Wales' main arterial roads – while the rescue and clear-up operations took place.
The road was reopened by 9.30pm when the clear-up was complete.
The Welsh Ambulance Service and air ambulance were on standby to take the driver to hospital.
A spokesman for Mid & West Wales Fire and Rescue Service said hydraulic equipment was used to free the driver who was trapped.