Sounds spot on for costs for the problem you have.
The valet key can't be used to reproduce any "master" keys and, as things stand, if you lose that key or it fails you are completely stuffed.
If the previous owner has the key number it might help. Look through all the original documentation that was provided with the car just in case you have that printed in there somewhere from the point of sale when the car was new.
Whoever sold you this car should have the keys. If not, legally, you can go back to them for the costs, even if it were a private seller.
In the latter case it might be wise to "negotiate" a refund of some of the purchase price - assuming you wish to keep the car after this has come to light.
Anything sold has to be "fit for purpose" & without at least one master key the car is evidently not, because if the valet key failed (chips can fail) then the car is unusable & keys cannot be obtained - the whole system has to be replaced - at considerable cost.
Personally, I would offer the seller a choice, pay for or resolve the problem to your satisfaction, or, alternatively, refund your money & take the car back - there's always another car.
If the seller tries to argue that the price paid reflected this issue it MUST be stated on the receipt & have been explained to you before you handed over the payment.
Without these two criteria the seller hasn't got any defence, it would be considered deception if it went to court because pertinent information was not declared.