Can I claim my wife's mother as a dependent?

My wife's mother lives with us 8 months out of the year and is a resident alien with a green card and a social security number.  I pay for all her expenses and she has no income.

 

Her social security number was obtained in 2024.  If I am able to claim her as a dependent, can I amend previous years returns and claim her as a dependent and how many years can I amend?