They invaded at the same time. That’s what “alongside” means here.
The alternative was for the nazis to roll all the way across poland — the only barrier between nazi germany and the soviet union — and subject the entire country to the holocaust instead of half of it, at a moment when the polish government had already fled and the country was not capable of repelling the nazis.