What prevents two miners from working on separate blocks which share transactions? I am just learning bitcoin and am confused on two issues.


What prevents one miner (Miner A) from creating a block including transaction X which has a transaction fee associated with it, and Miner B working on a separate block which also has the same transaction X in it. Clearly both of them cannot get the transaction fee. Does whoever solves it first get the bitcoins, and the loser gets nothing? Or are transactions "claimed" when you create a block, so others cannot also work on verifying them.
Is it possible for somebody to not have their transaction be verified in a long time? What if no miner picks up their transaction in their respective block they are working on? Or are the chances of that very low.


Thanks!
What prevents one miner (Miner A) from creating a block including transaction X which has a transaction fee associated with it, and Miner B working on a separate block which also has the same transaction X in it.


Nothing prevents that. That happens all the time.


  Clearly both of them cannot get the transaction fee.


Right.


  Does whoever solves it first get the bitcoins, and the loser gets nothing? Or are transactions "claimed" when you create a block, so others cannot also work on verifying them.


Whoever solves it and gets their block into the blockchain gets everything, and the loser gets nothing. This is not always the same as the person who solves it first. 


  Is it possible for somebody to not have their transaction be verified in a long time? What if no miner picks up their transaction in their respective block they are working on? Or are the chances of that very low.


That happens all the time. The general advice on the site is to use a high transaction fee, rebroadcast your transaction if it isn't confirming, and to not depend on transactions confirming quickly.