I understand most of the probability formulas but when doing questions I find it difficult to understand theoretically what the question is about and which formula to use for which. Can anybody please explain how to compute the answers? (are there any tricks how to know which formula to use for which?)

1. Four students go to a diner and order a hamburger, a cheeseburger, a fish sandwich, and a roast beef sandwich (one sandwich for each). When the waiter returns with the food, she forgets which student ordered which item and simply places a sandwich before each student. In how many ways can the waiter do this? (the answer is $24$)
2. In how many ways can three men and two women line up for a group photo? In how many ways can they line up if a women is to be at each end? (I think the answer might be $5!$ and $3!$)
3. a club has $12$ members, in how many ways can the offices of president, vice president, secretary, and treasurer be filled if the president and the vice president must be different member? (the answer is $19008$)
4. Colored flags arranged vertically on a flagpole indicate a signal (or massage). How many different signals are possible if $2$ red, $2$ green, and $3$ yellow flags are available and all the red and green flags and at least one yellow flags are used? (the answer is $330$)
5. a poker hand consists of $5$ cards from a deck of $52$ playing cards. The hand is a “full house” if there are $3$ cards of one domination and $2$ cards of another. For example, three $10$’s and $2$ jacks form a full house. How many full house hands are possible? (the answer is $3744$)

Thank You.