There could be many reasons for the swelling in feet and ankles.
It could mean that you have some heart failure going on, (Lung cancer
can cause right heart failure
) or that you aren't making protein or that one of the treatments you are taking is causing your kidneys to leak protein. So there are many possibilities, and you need your doctor to sort it out.
As far as life expectancy is concerned stage 4 lung cancer life expectancy can vary considerably among different people.
Stage 4 lung cancer encompasses several lung cancer types, and includes cancers that have spread to only one distant region or those that have spread extensively.
If docs are providing treatment ,then they at least have hope of extending life, quality life, for the person we are talking about it here. I would advise that since that time cannot be precisely measured even in the worst case scenario, that it be lived as if every day were the last, spent enjoying life, friends, family, spent loving and laughing.
Keep giving him good treatment and good psychological support and care and forget about the timing of death,which nobody can tell.