Imagine a person Bob has 10 bitcoins in his wallet. He wants to send 5 bitcoins to Alice and another 5 bitcoins to Uncle Tom simultaneously (in separate transactions). Will both Bob's transactions be confirmed in the same block?
If yes, than consider the case when Bob sends all 10 bitcoins to Alice in one transaction and simultaneously issues another transaction to send Uncle Tom the same 10 bitcoins. How is the double spending problem prevented in this case (I would like a technical answer for this one)?