In this rule

Historical Rules · 25 August 2017

Rule 508.7f

Official source text from the 25 August 2017 Rules release

Permalink

In a Two-Headed Giant game, the team or planeswalker the creature is attacking is reselected rather than the player or planeswalker. A team reselected this way must be an opposing team of the attacking creature’s controller.

Find this number in the current Rules