Update equations in Exercise 1.17 and 1.18.

Replace instances of n with b for cases.