My mother is in a wheel chair, her legs seem to be swollen, what could be the cause of this? She is 87 yrs old.

Difficult. Most common causes: depending edema from being seated too long, excessive salt or sodium intake, congestive heart failure decompensation, chonic venous insufficiency with stasis, kidney disease or liver disease ( cirrhosis), low Albumin ( protein or malnutrition) and many others. Check her heart and lungs.
Many possibilities. Just being in a wheelchair with the legs dangling most of the day may be reason enough for ankle swelling - walking improves venous return and thus reduces edema. However, at 87 years of age, there may be many medical problems, (i.e. Heart failure, renal insufficiency, liver disease) that may be contributing to fluid retention (not to mention medication side effects). She should see her physician.
Multiple reasons. There are multiple reasons for lower extremity swelling in the elderly, especially in individuals who are confined to a wheelchair. If this is new and your mother has any shortness of breath, i would suggest seeing a physician. On the otherhand, if this has been going on for a while and is not associated with any other symptoms it is likely venous insufficiency.