As written, your expression
ax/by
should be evaluated left to right: a times x, divided by b, times y. The multiplication is not done before the division, but both are done in the order they appear. Your first solution is right.
Some texts make a rule, as in your second solution, that multiplication without a symbol ("implied multiplication") should be done before any other operations in an expression, including "explicit multiplication" using a symbol. Following this rule, you would multiply a by x, then multiply b and y, then divide one by the other. Some (probably most) texts don't mention such a rule - but some of those may use it without saying so, which is far worse.
I don't know of a general rule among mathematicians that implied multiplication should be done before explicit multiplication. As far as I'm concerned, all multiplications fit in the same place in the order of operations. It's not an unreasonable rule, though, since it does seem that implied multiplication ties the operands together more tightly, at least visually; but the idea of Order of Operations (or precedence, as it is called in the computer world) is supposed to be to ensure that everyone will interpret an otherwise ambiguous expression the same way - so if some texts change the rules, or if people do what feels natural, the purpose has been lost.