For example, if applicant initially replies within 2 months from the
date of mailing of a final rejection and the examiner mails an advisory
action before the end of 3 months from the date of mailing of the final
rejection, the shortened statutory period will expire at the end of 3
months from the date of mailing of the final rejection. In such a case,
any extension fee would then be calculated from the end of the 3-month
period. If the examiner, however, does not mail an advisory action until
after the end of 3 months, the shortened statutory period will expire
on the date the examiner mails the advisory action and any extension fee
may be calculated from that date. In the event that a first reply is
not filed within 2 months of the mailing date of the final rejection,
any extension fee pursuant to 37 CFR 1.136(a) will be calculated from the end of the reply period set in the final rejection.
https://www.bitlaw.com/source/mpep/714_13.html