In your friend's mind, the car was returned with a defect that was not there before you took possession of it. This defect is now associated with you. In your mind, you are not at fault because the car is old and in need of some maintenance. Neither one of you is wrong and you are both at fault. As a means to show your thankfulness, it would be best for you to repair the problem.
Somebody recommended tightening the latch. I recommend some rust remover, WD-40, or grease be applied to the moving latch in the trunk lid behind the key lock.