Hi there
What we need first is the book value of the equipment
The book value is
originally costing - accumulated depreciation
100,000−65,000=35,000
Since the sale price is 40000 and the book value is 35000 This result a gain of 5000 (40000-35000)
Good luck!