Suppose `M_(1),M_(2),M_(3),M_(4)` are the rest masses of the nuclei `A_(1),A_(2),A_(3)+A_(4)+Q`
Here `Q` is the energy released. Then by conservation of energy.
`Q=c^(2)(M_(1)+M_(2)-M_(3)-M_(4))`
Now `M_(1)c^(2)=c^(2)(Z_(1)m_(H)+(A_(1)-Z)m_(n))-E_(1)` etc, and
`Z_(1)+Z_(2)=Z_(3)+Z_(4)`( conservation of change)
`A_(1)+A_(2)=A_(3)+A_(4)`(conservation of heavy paritcles)
Hence `Q=(E_(3)+E_(4))-(E_(1)+E_(2))`