@Potato37
There's a lot to unpack here. First, it depends on the value of the equipment. If it was under $2,500, you can just record the purchase as an expense and record the sale as income.
But, I'm guessing it was more than $2,500. If that's the case, then you should have been taking depreciation for the time it was in service. Did you do that? If you didn't, you need to contact your CPA/tax accountant because the IRS expects that you calculate the gain on the sale based on your basis in the equipment (orig. cost - depreciation taken or should have taken). So, for example, if this was a $100K piece of equipment with a 5-year depreciation schedule ($20K/yr) and you owned the equipment for 5 years, your basis would be $0 [$100K - ($20K X 5 yrs)]. In other words, it was fully depreciated. If you sold the equipment for $50K, you would need to record the $50K as a gain on the sale and that is all taxable income. However, you can make up for depreciation not taken and that's where your CPA/tax accountant comes in.
If you took depreciation, then ask your CPA/tax accountant how much depreciation was taken as of the date of sale to figure your basis in the equipment.