In your test the correct answer is, probably, passing. That's what Murphy's English Grammar says:
When one action happens before another action, we use having
(done) for the first action:
Having finished her work, she went home.
You can also say after -ing:
After finishing her work, she went home.
So, when there is the word after, it is more "right" to use [verb]-ing. But note that after having (done) occurs in practical usage. These sentences I've found on Google News:
After having done this, he returned to the scene
A bus driver almost choked to death after having found a coil in his two chicken breasts
Khan thought he had the fight with Mayweather wrapped up after having won a poll on the website.
Ahmad, it follows the same rules as the past question.
All tenses mentioned can be used in that sentence. However, as it's a past tense and you are telling a past history, using "had" would make it sound more fluent.
I waited until he had left the room, then I entered there.
Now talking about your second question.
I am waiting until he comes back - Right
I am waiting until he will come back - Wrong
I wait until he comes back - Right
Remember, "until" cannot be used followed by the future tense, all the others alternatives are suitable for until, past tense, past continuous, present tense, present continuous, present perfect..
And I waited for him to leave the room also works and sounds good too, and functions with others tenses too:
I was waiting for him to leave the room
I will be waiting for him to leave the room;
I waited for him to leave the room
I have been waiting for him to leave the room.
Best Answer
Just as "I feel", "I can't help but feel". You could use "feeling" if you reworded the sentence: "I can't help but have the feeling that I was ripped off" or "I can't help but have the feeling of being ripped off". The "can't help but" part does not change the form of the verb. You could just take those three words out and have the same meaning (or at least pretty close).