You'll notice there's stuff at the background where there wasn't. I don't know how to erase it. Yes, I know it says 'use layer B to erase', but for some reason it doesn't work with mine.
No, it can't - because the B1 tile doesn't erase, it replaces the upper layer tile at that position with itself. That is the reason why the B1 tile always have to be transparent and set to star - because it's placed on every position as the upper layer by default.
And for the bottom layer this is similiar - there is no function to erase anything, you can only place a transparent tile on those positions where you want the tile to disappear. OK, the bottom layer starts as transparent on a new map - but once you place something, you can only replace it - never erase it.
What happened here is that in the original tileset, there was a transparent tile - and you use that sometime in the past to erase wrong tiles in the bottom part of your map. But with the new tileset, there was no transparent tile at the same ID, so the transparent tile turned into the background you see.
As a result, you have only two options to solve your problem:
1) Use GIMP or Photoshop to place a transparent tile in the new tileset (preferably replacing the unwanted tile that is currently used on the map). If you replace another tile, you'll have to repaint that part of your map with the transparent tile.
2) make a new map and copy only the wanted parts of the old map to that one
And for the future just always remember: there is no erase in the RM map editor, you can only repaint with a transparent tile.