The most commonly accepted forms are the two you should always leave it in. It's up to you which you choose. If you need someone to choose for you, then always do y=mx+b. You do not get penalised if the sample answer has it in ax+by+c=0 unless they told you to!
ay+bx+c=0 is uncommon. Avoid it, unless the question specifically mentions that form.
The sample answers are called sample answers for a reason, not definitive answers.
___________________________
Or on a personal scale, I read ahead. If the question asks me to solve simultaneous equations (within the boundaries of 2U), I usually leave it in y=mx+b (point-gradient). Whereas if the question makes me use the perpendicular distance formula later, I usually leave it in ax+by+c=0 (general form).