What would happen is each player offensive player would get 2 bases from where they were at the start of the play. ie: The batter would advance to second base.

According to SportsRec.com and the official MLB rulebook,

>If the ball gets by the first baseman and skips out of play, the umpire will place the batter at second base. The rule is that when the defensive team puts the ball out of play, the batter will get two bases from the base he was at when the play started. Because the batter started the play at home, two bases would put him at second base. It doesn't matter that he was just a few feet from the base when it went out of play. He is entitled to second base and that's it.

This is proof that inside the dugout is out of play from baseballrulesacademy.com, verified with the official MLB rulebook.

>The lip of the dugout is considered in play but the steps going down to the dugout and the floor of the dugout is dead ball area. If the fielder does not have both feet on the playing field at the time of the catch, it is not a catch.

Therefore, both of these concepts apply, and since the dugout is out of bounds, both of the runners would advance 2 bases. It would not matter that he did not touch second base, he would advance to third base, but if he had touched 2nd base before the ball was thrown out of play, then he would be awarded 2 bases, he would go to home base.