Read it again.
Flanking requires two things.
1. You must make a melee attack.
2. Your ally must threaten.
A whip allows you to make a melee attack, fulfilling condition 1. Even though you aren't threatening, that's not required. You're only required to make a melee attack. As long as your ally threatens, you're flanking.
And yes, Ranged Threat is a Peerless Archer prestige class special ability, that allows him to threaten 10 feet with his bow as if it were a reach weapon (so he doesn't threaten adjacent squares).