I'm going to inadvertently make my friend loose his job
How are you going to do that? It doesn't sound nice of you.
I will get greedy and take his job position
You shouldn't cause your friend to lose his job. That could really hurt him and you should strive for a promotion outside of your friend's expense.
My friend isn't dying, plus I will support him after it's all over.
That's a bit sneaky and manipulative of you to do that. Are you sure this is what you want? The odds are your friend will find out and you will always be harboring a secret and probably hard to be your true self around him.