This comes up over and over again. Accidentally drag or move a window in GIMP and then you go both panels on one side. As annoying as it may be, there's an easy way to reset the windows layout to their default location.
Go to Edit menu -> Preferences -> expand the Interface item -> Window Management -> Reset Saved Window Positions to Default Values
Restart GIMP and you should be back to default layout. Happy editing!