u have to go to kyoto- there is no where else like it in the world- definitely spend some time there before going on to tokyo
Try to get to Nara while you are out there too. it's about an hour or 2 from kyoto.
That said: I loved Osaka more by far because of the warm people, and hot nightlife. Osakans welcomed me and my goup in every way while Kyotoans seemed more cold. If you are of the mind to have a night on the town, Osaka was the most fun that I have had out (and yes, it beat Tokyo...) we partied till 9:00am and still could have partied longer if we didn't have to check out of the hotel!
I would do both! I think sometimes that people don't realize how close Kyoto is to Osaka. Fifteen minutes by bullet train or an hour by an express commuter train (Keihan line from Kyobashi station). Kyoto is not to be missed, but Osaka's culture is distinct from Tokyo and should be experienced. If price is no object, stay at the Swisshotel in Namba, in Osaka's Minami district.