The correct answer is: A. for/when

The word "for" is used to indicate a period of time, while the word "when" is used to indicate a specific point in time. In this sentence, the speaker is indicating that the woman had been trying to learn how to use a computer for a long time, and then she gave up because of her illness.

The other options are incorrect because they do not make sense in the context of the sentence. The word "till" is used to indicate a point in time up to which something happens, while the word "before" is used to indicate a point in time that comes before something else. The word "so" is used to indicate a reason or cause, while the word "until" is used to indicate a point in time up to which something happens. The word "since" is used to indicate a point in time from which something happens.

Here is a rewritten version of the sentence using the correct words:

She had been trying to learn how to use a computer for as long as she lived here, but she gave up when she became ill.