If you're playing on a normal shard (one that has Trammel/New Haven), you can buy the skill up to 40 in New Haven, then take a quest to go kill things in the ruins of old Haven to get to 50 skill.
On shards without New Haven, it's just a matter of finding some quiet place, putting on a 100% LRC suit (or have lots of regs), then casting spells outside of combat. At 22 Magery, Second Circle spells should be about 55% chance to cast, and 3rd Circle ones about 30%. So, just cast any of the buffing spells on you, or get a box and repeatedly cast magic lock and unlock on it, or something similar. Whatever uses the least regs for you. Try to cast spells with about 25%-75% chance success for gains - the Magery skill description on the official UO pages gives the breakdowns as to what skill levels one has to be for 25%, 50%, 75% and 100% success, for each spell level.