Let p∈P. Then aAp=pnpAp where np≥0, since Ap is a discrete valuation ring. As(A/a)p=Ap/aAp,lp(A/a)=np, whence χ(A/a)=∑p∈Pnpp=diva (§ 1, no. 4, Proposition 7).
On the other hand, (A:a)=A;aAp=p−npAp, hence lp((A:a)/A)=np and we conclude in the same way.
Bourbaki puts the proof directly after the statement, so what is above is the statement and its proof together.