Let $A$ be the set of all officer assignments with no restrictions. Note that $| A | = 4 \cdot 3 \cdot 2 = 24$.
Let $B$ be the set of all officer assignments such that Bob is treasurer, and let $C$ be the set of all officer assignments such that Cyd is secretary. Note that $|B| = |C| = 3 \cdot 2 = 6$.
The number of officer assignments such that Bob is not treasurer and Cyd is not secretary is $$ |A| - | B \cup C| = 24 - (\underbrace{|B| + |C| - |B \cap C|}_{\text{inclusion-exclusion formula}}) = 24 - (6 + 6 - 2) = 14. $$