Kohli joined Australian counterpart Steve Smith with four tons in the series, while Rahul rode his luck including some help from spidercam, to raise his maiden ton in only his second Test.
Chasing Australia's 572 for seven declared, the tourists were 342 for five at the close with Kohli posting his 10th Test hundred to be unbeaten on 140 with Wriddhiman Saha not out 14.
In the process Kohli surpassed Rahul Dravid (619) as the highest-scoring Indian batsmen in a series in Australia with 639 runs at an average of 106.50.
The home attack kept the lid on the Indian scoring on a flat, lifeless Sydney Cricket Ground pitch with all the runs hard-earned but helped along by some ragged Australian fielding.
Smith put down two chances, one when Kohli was on 59 and the other off Rahul, which was tinged with controversy over the positioning of the spidercam television camera hovering above the ground.
Rahul gave chances on 41, 42 and 46 but the final opportunity was the day's major talking point with Smith appearing to blame spidercam for putting down the skied catch.
Smith was seen to mouth "fucking wire" to team-mates, suggesting he might have been distracted by the cables suspending spidercam in losing the trajectory of the ball.
Cricket Australia and the Nine Network later confirmed in a joint statement that Smith had been "distracted by one of the wires in his eyeline".
It got no better for Smith nearing tea when he bungled a two-handed chance over his head from Kohli, who was on 59, at second slip off Mitchell Starc.
"It was good. It was only the captain today, wasn't it?" coach Darren Lehmann quipped about his team's ongoing catching malaise.
"Disappointing. A couple of tough chances, but you still have to take those on a wicket that will deteriorate on days four and five.
"We needed to speed up the game today, so a little bit disappointing. We needed to take those chances and that's now two Test matches in a row. But there's still a lot of time in this game."
- Exasperated skipper -
Rahul also had a lucky escape on 42 when he charged down the pitch for a run and was sent back by Kohli only to tumble to the ground and lose his bat.
Yet he still managed to scramble to safety and beat Brad Haddin's delayed throw to the non-striker's end.
Exasperated skipper Smith stood glaring at Haddin with his arms outstretched at the farcical blunder as India had a big let-off.
Rahul survived another scare earlier in the morning session when the Australians appealed for a catch by Joe Burns at bat-pad off spinner Nathan Lyon but umpire Richard Kettleborough was unmoved.
Infrared television replays showed the ball may have brushed a glove and off the thigh guard to Burns.
But Rahul was finally out in the 87th over when he skied an attempted pull shot and was caught by Starc off his own bowling for 110 off 262 balls with 13 fours and one six.
Rahul put on 141 runs for the third wicket with Kohli.
"I'd say I'm more relieved than proud of myself," Rahul said of his ton.
"It was a nightmare debut (in third Test in Melbourne) and it didn't make my life easier coming here.
"I just kept telling myself the only way from here is up. I feel batting up the order gave me, I feel, a little more time for myself."
There was late excitement for the home crowd when Shane Watson was on a hat-trick after trapping Ajinkya Rahane leg before wicket for 13 and then Suresh Raina was out next ball to a diving Haddin catch. Saha saw out the hat-trick attempt.
Rohit Sharma was out in the morning session attempting to sweep Lyon only to get a bottom edge on to his stumps for 53 off 133 balls, ending a stubborn 97-run partnership with Rahul.