Is it known whether the original agent did hold the deposit or whether it was transferred to the original Landlord for them to hold.
When the agent ceased trading then, if they held the deposit, I'd have said the most sensible thing would have been for them to hand the deposit back to the original Landlord unless there were financial difficulties.
When the flat was sold then it would be usual for the deposit to be transferred to the new owner (developer) along with an apportionment relating to rent.
If the agent doesn't know anything about it (it sounds like you've spoken to them regardless) then can they tell you who held the deposit.
Does the tenancy agreement say anything about the deposit? Is it with the original landlord and your son and friend or with the agents, son and friend?
If in the original Landlord's name then I'd say the new Landlord should honour the return of the deposit as it's not your son's fault if it wasn't transferred when the flat was sold. They can make their own claims over this.
The contract for sale would have been subject to the tenancy agreements so check with the developers if they will honour it and return his full deposit.
Has he got any receipts or similar as proof of payment?
Could he negotiate on rent eg he stops his rent early to equal the amount of the deposit (don't cancel anything that has been already paid like a cheque though)? do negotiate though rather than just witholding it.
If they are being difficult and saying they don't have it so won't return it, you could ask the developer to provide a response in writing as to why no deposit is being returned so that you can take legal advice accordingly.