Alright, there are a few issues with this purchase set up but it's nothing that can't be taken care of right away. The first S-rank that a character has is free, but for every subsequent one after they must cap 2 skills at A. So for a 2nd S-rank, they need one S and three As, for a third S-rank, they need two S and five As. Two As for every S beyond the first one. Does that make sense?
There is a small problem with the Ryo purchase as well. Each 'stack' of Senbon, Kunai and Shuriken does indeed cost 1,000 each, but they come in a pack. Each purchase of Senbon gives you 10, while Shuriken and Kunai give you 5. So your numbers in relation to the price you spent is way off.