Starting with eq. 16:
eq. 16a: 
now since:

then substituting for p(x) into eq. 16a:
eq16 a(i): 
integrating eq. 16a(i) by parts:

and since exp(- 0 / V) = 1:

multiplying through by -V and rearranging:

and finally, factoring to get our answer:
eq. 16b: