The formula for this is n! (the explanation point is not a typo). "n" represents the number of objects in the set (or in this case numbers).
a. 5!=120
b. (same formula) 5!=120
c. (for this one we don't take into consideration the triangle because it isn't moving so we basically have 4) 4!=24
d. (same concept as c except now we have 2 that aren't moving) 3!=6