It’s difficult to know the real value of a vehicle taken in trade, the dealer may have simply inflated the value of the truck rather than discount the MSRP of the new vehicle. It’s also possible that your co-worker’s truck was worth more than $22k. A new 2017 Silverado could have cost more than $50k, depending on the exact trim and options.
The only way to find out what a used vehicle is actually worth is to sell it in a stand-alone deal.