Which one is correct: What was the weather like in Toronto?" or "What was the weather in Toronto like?"
It's really just a stylistic choice whether to put the preposition like immediately after the "head" noun weather in the full noun phrase being queried (the weather in Toronto), OR move it to the end of that noun phrase.
But stylistically it would be a very bad choice to move like to the end of a longer noun phrase, such as...
? What was the weather in Toronto yesterday afternoon at 5 o'clock after you finished work like?
(Where the initial question mark is a linguistic convention for "questionable, unlikely".)
In that case, the only sensible option is to introduce like somewhere earlier. Ideally after weather - it could reasonably be "delayed" until after Toronto, but the further it is from the "head" noun, the harder it becomes to parse.