Kk really planned the whole captaincy contender task. From start only he knew 2 people will be left at the end no matter what. He figured it out who had whose secret and then removed one by one. Of course there were chances that it would not work out so at end they had to convince Rajiv. Except Nishant Noone was able to figure out Jay has shamita's secret. Umar, teja and afsana were also part of the whole thing and they did all the convincing.
Initially he didn't form any alliance or anything but afterwards he tried to break the alliance of opposition.
Bb edited it very badly and it didn't show exactly what happened.
P. S. - when these people are thinking task will be cancelled Kk knew that this can't be cancelled and two contenders will be definitely left at the end. If the hm can't do it then bb also will do it in its way.