Can nearsighted people get nearsighted in one eye and farsighted in other when they get older?

Yes. Some people have unstable refractive errors and can experience changing prescriptions throughout their lives. Many things influence your refraction including the length of your eye, the shape of the cornea and lens, degeneration of the cornea and or lens, and changes in body chemistry especially blood sugar. The refraction can change in many ways throughout life.