It used to be three years. It is now a five year look back period.
5 year Medicaid “look-back” in most states....some states are less:
https://www.medicaidplanningassistance.org/medicaid-look-back-period/