Answer
See the detailed answer below.
Work Step by Step
$\bullet\bullet $ In path A, the gas undergoes two processes: An isochoric process, then an expansion isobaric process.
So,
$$(\Delta E_{th})_A=W_A+Q_A\tag 1$$
$\bullet\bullet $ In path B, the gas undergoes two processes: An expansion isobaric process, then an isochoric process.
$$(\Delta E_{th})_B=W_B+Q_B\tag 2$$
Since the two paths start and end at the same points, then
$$(\Delta E_{th})_A=(\Delta E_{th})_B$$
Plugging from (1) and (2);
$$W_A+Q_A=W_B+Q_B$$
Hence,
$$Q_A-Q_B=W_B-W_A\tag 3$$
From the given graph, we can see that
$$W_A=W_1+W_2=0+(-2P_i\Delta V)$$
$$W_A=- 2P_i(2V_i-V_i)=\boxed{-2P_iV_i}$$
And that
$$W_B=W_1+W_2= -P_i\Delta V+0$$
$$W_B= -P_i(2V_i-V_i)=\boxed{- P_iV_i}$$
Plugging into (3);
$$Q_A-Q_B=-P_iV_i-(-2P_iV_i)$$
$$\boxed{Q_A-Q_B=P_iV_i}$$