Note that in the useful diagram above, the generator has an actual output impedance of 50 ohms.
That is not a necessary assumption for this problem--the assumption is that the generator (transmitter output) is designed for optimum use into a 50 ohm load.
Laboratory RF generators usually have an actual 50 ohm output impedance (provided by an actual resistor), but power amplifiers can have whatever output impedance the design produces, either higher or lower than the optimal load.
(The "maximum signal transfer theorem", with active amplifiers, is relevant to gain, but not necessarily applicable to power output of a practical amplifier.)
Again, the attenuator with a good 50 ohm termination presents 50 ohms to the generator, and a large-attenuation attenuator will present close to 50 ohms to the generator, regardless of termination.
Therefore, in his diagram, measuring the actual voltage and current at the attenuator input will give a ratio of 50 ohms and a product equal to the power from the generator.
One can calculate that from his diagram of the "pi" attenuator, using his resistor values: with a 50-ohm termination, the input impedance is 51.6 ohms; with a short-circuit termination, the input impedance is 50.6 ohms; with an open-circuit termination, the input impedance is 52.6 ohms; or, 51.6 ohms +/- 1 ohm.
For a generator optimized for 50 ohms load, one needs to tune or adjust the actual load (antenna or whatever) to get 50 ohms at the cable connector that will connect to the generator output.