That would depend on which airlines you are taking. You do not require a transit visa if you are coming in via Dubai ( DXB ) but you do require a transit visa if your US visa has expired when you are coming in via Frankfurt ( Lufthansa ). You can view all the
transit visa requirements here. You can also find it at some other forums like immihepl.com. Let me know if you have any questions.