Use like in that 'similar to/ such as/ ' sense when nothing else needs to be stated in order to be completed and unambiguous.
he used to have a car like mine
they were like brothers
she looked nothing like Audrey Hepburn
why are you talking about me like that?
the cautionary vision of works like Animal Farm and 1984
Both your presumed to-avoid examples are grammatical.
Flying a plane is like driving a car but it's a bit more complicated. (similar to) You can multiply a number by two to have an even number, like 3*2=6. (the same way as, for example)
However, like is a poor choice in the first case because it is unclear here as to 'in what way/ in what respect(s)'; it even sounds like you contradict yourself later.
Flying a plane is
likesimilar to driving a car but it's a bit more complicated. ('similar to' cautions that it is 'like but not the same').
In the second case, the intention is to present a use-case/ example (3*2=6) to illustrate the process just stated (multiply a number by two to have an even number).
You can multiply a number by two to have an even number,
likefor example, 3*2=6.
Though like can function as more than one POS, has many uses and is probably the easiest to read and understand, it can easily make a statement ambiguous. Avoid it for that reason, in favor of a more precise word that makes the statement clear.