the number of options for doors (2) times the number of options for cylinder (2 )times the number of colour options (8) (2x2x8) is 32. My apologies I don't know about number 5
They're just multiplying those numbers by 3 then just multiply 162 by 3 to get one of the next numbers in the sequence then multiply those awnser you get by 3