The OG's don't have to be the same but it's probably preferable. I assume, from the way you're asking, that you ran off into one pot until full and then switched to running off into the second pot. Next time you'd probably be a little better off switching back and forth between the pots. That way, the two worts will be much more the same. The way you did it, the first pot will have a significantly higher gravity than the second and gravity affects hop utilization. Either way, though, your beer should turn out fine.