Equation (1.34) is derived from the ideal gas laws, and refers only to an ideal gas. Equation (1.38) is more general, and is valid for any fluid--in particular for seawater.
Considering the relation you want to derive, $\rho_\theta=\rho-\rho_a$, let's first define the terms: $\rho$ is the density (mass per unit volume). $\rho_\theta$ is the potential density. It is defined relative to a reference pressure, and at every point is equal to the density the fluid there would have it it were compressed or expanded the required amount to reach that reference pressure. $\rho_a$ is defined relative to a reference pressure and density: it's what the density would be if the fluid were well mixed--Kundu calls it the "neutrally stable reference state". From these definitions, you can see that the relation is not correct, but is off by a constant. We can write the actual relation thus: $\rho_\theta(z)=\rho(z)-\rho_a(z)+\rho_0$. Here, $\rho_0$ is the density at the reference point, and I have added $(z)$'s to emphasize that, unlike $\rho_0$, the other terms are functions of depth. This relation can be regarded as a definition of potential density; as such is does not really make sense to try to derive it.