Well the easiest way to do it with the least amount of transfers really makes much more sense. Ok, heres what you do.
1) Fill 5 Lt pot and then pour it into 7 Lt pot. This will leave you with an empty 5 Lt pot and an almost full 7 Lt. pot.
2) Fill 5 Lt pot once again and pour into 7 Lt. pot that was almost full. This will leave you with 3 Lt. in your 5 Lt. pot.
3) Pour the 5 Lt. pot that now contains 3 Lts. into the pan.
4) Repeat steps 1-3 again and it will have 6 Lts in the pan and your door will open. FREEDOM!!!