(a) Given, $\mathrm{\Delta}Q_{A} = + 8 \times 10^{5}$J
$W_{A} = + 6.5 \times 10^{5}\ J$
$\therefore$ Chage in internal energy
$\mathrm{\Delta}U_{A} = Q_{A} - W_{A}$
$= 8 \times 10^{5} - 6.5 \times 10^{5}$
$= 1.5 \times 10^{5}J$
In second process
$Q_{B} = 10^{5}J$
In both the processes, initial and final states are same, so change in internal energy will be same.
$\therefore\ \ \ \mathrm{\Delta}U_{A} = \mathrm{\Delta}U_{B}$
$1.5 \times 10^{5} = Q_{B} - W_{B}$
$1.5 \times 10^{5} = 10^{5} - W_{B}$
$W_{B} = 10^{5} - 1.5 \times 10^{5}$
$= - 0.5 \times 10^{5}J$
Work done is negative, so, work done on the gas is $0.5 \times 10^{5}J.$