Player data doesn't actually work that way — instead of being stored in your world save under “player 2” and “player 3” slots, inventory data is stored in your world save under the UUID of Bob and Dave's Minecraft accounts. This means that Bob will always have Bob's inventory when he connects, and Dave will always have Dave's inventory.
That said, your objective is to get you access to Bob's diamonds. The only way to do this is to edit the files inside the world's save folder, changing Bob and your inventory information by hand. You can do this with an external NBT editor tool, like NBTExplorer, using it to open the players folder and browsing until you find the inventory of the player you're interested in. (After making a backup of your save, of course.)
What you're looking for specifically in the NBT editor is
[world name] →
[UUID of Dave's account].dat →
Inventory. Inside the inventory NBT folder will be a pile of entries, all apparently identical. Each of these represents an inventory slot that has something in it. You have to look through these until you find the one that has inside it
id:264 (the [ID of the diamond item]3.
Once you find it, what to do with it depends on the capabilities of your NBT editor. If you're using NBTExplorer, you can only view, modify, and delete data – you can't cut and paste it, like NBTEdit can (which is out of date at the moment). The simplest thing to do is to just delete that inventory entry entirely to remove it from Bob's data.
Then, rather than trying to craft a hand-made inventory entry in your own data (which is stored in two different places —
[UUID of Ben's account].dat — and requires knowing how to set the
slot data correctly), instead just start up Minecraft, load the world up, make sure cheats are enabled (either already, or by using the Open to LAN trick to re-enable cheats), and then
/give yourself the 20 diamonds.
It's more complicated if you're trying to access complex items like weapons, armour, potions, books, or enchanted items though. In those cases, either use a powerful NBT editor that can cut-and-paste inventory entries… or make sure that Bob stores his stuff in a chest before disconnecting next time!