Let Y_{ij}=1 if the i^{\text{th}} child is classified as obese at the j^{\text{th}} occasion, and Y_{ij}=0 otherwise.

The marginal probability of obesity at each occasion follows the logistic model

log\frac{\Pr(Y_{ij}=1)}{\Pr(Y_{ij}=0)}=
\beta_1+\beta_2\text{gender}_i+\beta_3\text{age}_{ij}+\beta_4\text{age}_{ij}^2+\beta_5\text{gender}_i\text{age}_{ij}+\beta_6\text{gender}_i\text{age}_{ij}^2.

If one construct the hypothesis that changes in the log odds of obesity are the same for boys and girls, then H_0:\beta_5=\beta_6=0.

But I am not understanding that why it is not H_0:\beta_2=0 to indicate the hypothesis that changes in the log odds of obesity are the same for boys and girls? Since \beta_2 indicates changes in log odds of obesity for male than that of female (assuming female is reference category).