If they refund the entirety of the second transaction, logic follows a third transaction of $9,975 would be correct if you actually wanted to buy $10k.
I suspect that's not what's going to happen though. OP will get a refund of $25 + $9,975.
You're forgetting there appears to be a race condition at play. The third transaction was marked as canceled because the second has not finished processing and so is still counting against the total. There is no guarantee the govt system will check that again once 2 completes (in fact, I'd be shocked if it did). And by the time both 2 and 3 process, the window to buy looks like it will be closed per the author's post.
The order won’t actually matter here - but even if it did, the “right” thing will happen either way depending on which interpretation of the email you have.
The third transaction got the same response as the second. Which would actually imply that the common reading of that email (he’s getting $25 back from the second deposit is correct, and he’s going to get the entire $9,975 back from the third.)
In which case, the author would have 20k locked up in the government and only $25 invested.
A horrible way to write a system of course but if the system takes 10 weeks to process a refund then it doesn't sound like the system is that great to begin with
Hopefully the folks whose desk this paperwork ends up on catches it and has the authority to just send back the $10k and transfer the other $10k to bonds.
But would you be willing to bet $850 that your interpretation of the error message is correct? Because that's the decision the author had to make. (Or I suppose they'd be betting $850 minus 8.5% of $25)
I suspect that's not what's going to happen though. OP will get a refund of $25 + $9,975.