If we ignore the fact that the Players handbook states that a NPC caster will charge 10 x Lvl x SplLvl to cast any spell, there is an easy way for a PC Wizard of 9th level to make money.
At 9th level, without any special metamagic, a Wizard can use a single Wall of Iron Spell to create 18,750...