Fake Spellcasting
If 3.5 is on the table, go with the factotum, from Dungeonscape. Basically “Indiana Jones, the class,” the factotum makes incredible use of Intelligence, and also gets a smattering of spell-like abilities off of the sorcerer/wizard list. An excellent class in general, though you will have somewhat less stabby.
See how to optimize a factotum for (a lot of) ideas.
Real Spellcasting
Of course, fake spellcasting is nice and all, but real spellcasting is better. Also, the factotum doesn’t really get that much Sneak Attack damage, while (at least in 3.5) we can get that with spellcasting.
Arcane trickster is, sadly, pretty poor. It’s not awful by any means, but it has a dramatically fewer skill points. In general, Pathfinder prestige classes are much less good than 3.5 prestige classes, an intentional choice on Paizo’s part, a reaction (overreaction, in my opinion) to the perceived over-use of prestige classes in 3.5. Since you want to combine two different things (rogue and spellcasting), though, a prestige class is the natural place to look. Thus I hope your DM does allow 3.5 material to be used here.
In 3.5, the unseen seer from Complete Mage is much better: 6+Int skills, full spellcasting, ¾ BAB, and bonuses to precision damage (e.g. Sneak Attack) at 1st, 4th, 7th, and 10th (i.e. 1d6 less than a rogue would get over the same levels). Plus they get the ability to poach divination spells from other classes: the big win for you here is hunter’s eye, a 1st-level ranger spell from Spell Compendium which grants quite a few Sneak Attack dice.
Spellwarp sniper from Complete Scoundrel is another interesting choice if you’re a ranged rogue, either in addition or instead of unseen seer. Only 4+Int skills, which sucks, and Sudden Raystrike is quite a bit weaker than Sneak Attack (but the primary difference doesn’t apply to ranged attacks), but the Spellwarp feature is awesome. It allows you to turn area spells into rays, which you can Sneak Attack with, and better still, if that spell offers a Reflex save, it’s replaced by the ranged touch attack of the ray. It is much easier to land a ranged touch attack, particularly against a flat-footed foe, than it is get them to fail a Reflex save.
A really simple build would be rogue 1/wizard 4/unseen seer 10/spellwarp sniper 5; since you have 2 rogue levels already, that becomes a rogue 2/wizard 3 entry. I’d probably get the first three levels of spellwarp sniper ASAP, since you definitely want Spellwarp, and you don’t want to go too long without Precise Shot. So probably more like rogue 2/wizard 3/unseen seer 2/spellwarp sniper 3/unseen seer +8/spellwarp sniper +2. This works out pretty well because it means you get hunter’s eye right before jumping ship onto spellwarp sniper.
If you don’t want to mess with rays and are really focusing on stabby for applying Sneak Attack, arcane trickster is probably better than spellwarp sniper for the 5 levels after completing unseen seer.