Used aircraft pricing by AI brokers is based on several calculations and it is working as intended, and this is not a bug (especially since it has not changed in any way in a very long time).
The base price of each plane is calculated based on the formula that takes into account the plane's database list price, inflation, age, condition, and the possible C/D checks AI has performed to the plane when it's been put for sale (from storage). Respective new aircraft price (if available) is not a factor, nor is the number (or price) of other similar planes on the market. Nor it has got anything to do with changes in lease extension prices. The sale price calculation is done individually for each plane.
The base price is then adjusted based on how many times this plane has been listed on the market previously, and then taken off the market when it has not been sold. Planes do not sit there forever but the AI rotates them. They can be listed up to 7-8 times before they go as scraps, price decreasing every time. There is also a minor random factor so to create a bit of variation.
When the plane is on the market and if it's not being sold in a reasonable time, the broker will reduce the listing price. When it's been there long enough, it's taken back to storage and listed later with a lower price.
In your example the 24.3mil plane is already gone from the market, since it's been there so long I guess, and the 42mil plane is now reduced to 40mil and it has a high price since it is the first listing of that plane to the used market, and it has just entered there (as you see the price is going down all the time).-