How can a company run out of cash when its stock prices is dropping?
It appears to me that it is the other way round: The RBS was running out of cash which is why the stock price was dropping. 

Stocks usually don't affect the immediate operation of a company, since they are traded on secondary markets (stock exchanges) among stock owners, not bought from / sold to the actual company which issued the stock.