That stock is already accounted for as Treasury Stock (as they could decided to sell some off). RIM doesn't "get" any of the money. It ALL goes to the shareholders. When RIM bought back the stock, the had to pay money for it.
There is some basic understanding missing here. When a company (or individual) buys another company they make a Tender Offer (Tender Offer) directly to the shareholders. They want to buy their shares so they can have a majority position (or more), and replace/remove the current Board. There are very strict rules on Tender Offers. If the offer is accepted (the company under attack immediately states that the offer is insulting and very underpriced) then the sellers get cash (or stock in the acquiring company) and the buyers get the stock in the company they are trying to acquire (RIM). One the acquiring company has the majority of the shares (50.1%) then it is game over.
The acquired company doesn't get any money. The executives (who may own a lot of stock) will get money.