How is it possible for a person to have both myopia and farsightedness?

It is not possible. You can have myopia in one eye, and hyperopia in the other, but not both in one eye. Unless you are actually referring to the loss of ability to read without glasses, which happens to everyone in their mid to late 40's. This is actually 'presbyopia', which some people confuse with farsightedness.