Tamaki just got through a rough break up with Haruhi. During his recovering period, he notices that he's starting to have feelings for one of his closest friends. Tamaki has never felt this way for another male.
Kyoya was just trying to help his friend during this hard time in his life. He knew that Haruhi meant everything to Tamaki. He didn't mean to fall for the prince. Truly, he didn't.