Nopoke laid it out well.
Is it your first turn?
Then you can't evolve or level up.
It doesn't matter where the Pokemon came from. It's still your first turn.
Any turn after the first of either player, the only question is, "was this Pokemon already in play when I started my turn?"