Hi Mimi. I wouldn't use "which" in either of these sentences... I would use "that". I like the wording of 2. better but, strangely, in this sentence, I wouldn't say "my":
"The computer that I gave away was only three years old."
It sounds better to my ears and the fact that you gave it away states that it was yours in the first place.
Having said that, I think you could use either sentence but 1. sounds awkward to my ears.