Continuity equation: initial value problem Given: the following continuity equations for $p$:
$ \partial_tp + \partial_x (v p) = 0 $,  for $(t, x) \in (0, \infty) \times \mathbb R$
$ p = p_0$, for $t = 0, x \in \mathbb R$
Let $z(t, x_0) := p(t, s(t, x_0))$, where $s(t, x_0)$ is the solution of: 
$ \partial_t s(t, x_0) = v(t, s(t, x_0)) $ and $s(0, x_0) = x_0$.
Why does then $t \rightarrow z(t, x_0)$ solve the following initial value problem? 
$$\partial_t z(t, x_0) = -\partial_x v (t, s(t, x_0))_{|x=s(t, x_0)} z(t, x_0)$$$$z(0, x_0) = p_0(x_0)$$
 A: This problem is basically rewriting the PDE in parametric form using $s(t,x_0)$ as a parametrization in $t$ for $x$. Take $z(t,x_0):=p(t,s(t,x_0))$ and find it's derivative in $t$. Via chain rule,
$$\begin{align}
\partial_tz(t,x_0) &= \partial_tp(t,s(t,x_0))+\partial_xp(t,s(t,x_0))\,\partial_ts(t,x_0)\\
&=\partial_tp(t,s(t,x_0))+v(t,s(t,x_0))\,\partial_xp(t,s(t,x_0))
\end{align}$$
where the second equality comes from $\partial_ts(t,x_0)=v(t,s(t,x_0))$. Now cleverly add $p\partial_xv$
$$\partial_tz(t,x_0)+p(t,s(t,x_0))\,\partial_xv(t,s(t,x_0))=\partial_tp(t,s(t,x_0))+\partial_x(v(t,s(t,x_0))p(t,s(t,x_0)))=0$$
The right hand side is equal to zero because it satisfies the PDE. Thus we see that $z$ must satisfy
$$\partial_tz(t,x_0)=-z(t,x_0)\,\partial_xv(t,s(t,x_0))$$
The initial condition is trivial. At $t=0$,
$$z(0,x_0)=p(0,s(0,x_0))=p(0,x_0)=p_0$$
EDIT: Solving specific problem requested by DMan in the comments below.
Given $v=\frac{x}{1+t}$ and $p_0=1-\tanh(x)$, we can use the method of characteristics described by this problem. Chain rule out derivative in $x$ to obtain PDE in proper form ready for the method of characteristics.
$$\partial_tp+v\partial_xp=-p\partial_xv$$
As indicated previously, $t$ is essentially the characteristic variable as $s$ is directly related with $t$ via $s(t,x_0)$. This can be shown by the first formula along characteristic coordinate.
$$\frac{dt}{ds}=1 \implies t=s$$
which are the characteristics after invoking initial condition $t(0)=0$. Now ODE for $x$ is
$$\frac{dx}{dt}=\frac{x}{1+t} \implies x=x_0(1+t) \implies x_0=\frac{x}{1+t}$$
Now for $p$
$$\frac{dp}{dt} = -\frac{p}{1+t} \implies p = \frac{1-\tanh(\frac{x}{1+t})}{1+t}$$
after applying the initial condition and substituting for $x_0$ yielding the answer. Plugging the solution back into the PDE confirms the result.
