If operators $A$ and $B$ commute and $B$ and $C$ commute, do $A$ and $C$ necessarily commute?
Choose $B$ as the identity operator and $A$ and $C$ any operators that don't commute.
Choose $B$ as the identity operator and $A$ and $C$ any operators that don't commute.