I'm going to echo what everyone else said about being mechanically similar: it doesn't matter. The stats aren't going to be what everyone remembers, unless your group is entirely comprised of min/maxers (and if they are, they'd probably be better served by another game style entirely.) Even in systems that support a large number of optimal configurations, it's still a finite number. There's bound to be overlap somewhere, eventually.
If it's a new game, just see where your natural playstyles take you. It's entirely likely that you'll end up evolving totally different characters, just based on what you like to play. Different personalities, different situational preferences... If one of you favors support over nukes, and the other leans more to the blow 'em up school, no one will EVER confuse the two. And neither of you will feel left out or overshadowed. If, after a few play sessions, your characters still feel too similar, sit down with the other player and work out which niches you'll take.
It gets a little more complex if you're trying to work yourself into a game that's been going on for a while. In that case, the existing character likely has precedence, so you'll have to sort of work your way into unoccupied space. Figure out what they're doing, and find a way to complement that. Talk to them about it. It's never a bad idea to discuss things of this nature with the affected parties. It's been my experience that as long as you're not directly aping the existing character, most players are cool with there being similarities.
Something else you might want to try is playing against type. Odds are, the existing character falls into the stereotype for that class to one degree or another. So try something else, that's not in the stereotype. If you can manage to fill a completely different trope than what your class has, no one is likely to even notice the similarities in the mechanical sense.
In the end, a lot of the difference between characters isn't their numbers, it's the characterization. As long as you're both playing different characters, you shouldn't have a problem. It is, after all, entirely possible to create several dozen or so different characters off the same statblock; that's the entire idea behind NPC templates. Even if the matching numbers do make it a little awkward, keep in mind that most systems open up as you level. More options become available the higher you get, so as you both level, the two of you are more than likely going to drift further and further. If your system offers prestige classes or the equivalent, then simply choosing a different prestige class than your party-mate is going to differentiate you two quite a bit. And it'll start working as soon as you decide what prestige class you're working towards, because you're going to develop a different focus.