They're both right (sort of).
Let's say the peak voltage = 1 Volt, and the load = 1 Ohm.
So peak current = 1 Amp and peak power = 1 Volt * 1 Amp = 1 Watt.
But it's only 1W for half the time, so the average power = 0.5W.
That agrees with "P=amplitude^2 / 2".
But the question is about harmonics, so we have to worry about the Fourier analysis.
Let's say T0 = 1mS, so the frequency is 1KHz.
Then that square wave is equivalent to:
- 0.5V DC
- plus 1khz sin wave with peak amplitude = .637V
- plus 3khz sin wave with peak amplitude = .637V / 3
- plus 5khz sin wave with peak amplitude = .637V / 5
- plus 7khz sin wave with peak amplitude = .637V / 7
- plus etc etc etc to infinity.
But they only want to know the percentage up to the third harmonic so you can work it out like this:
- DC: 0.5V so Power = 0.5V^2 / 1 Ohm = 0.25W = 50% of total.
- 1khz: .637V peak = .450V rms so Power = 0.45V^2 / 1 Ohm = 0.203W = 40.6% of total.
- 3khz: .637V / 3 peak = .150V rms so Power = 0.15V^2 / 1 Ohm = 0.022W = 4.4% of total.
Answer = 50% + 40.6% + 4.4% = 95%