Can someone explain how the author get to the last line from the previous line:

Its definitely has to do with the idea you can drop constants when you dealing with proportion but I just don't see how the author gets there.
Copyright © 2021 JogjaFile Inc.
First, notice that the second-to-last line is of the form
$$k_1e^{a}\times k_2e^{b}$$
for appropriate replacements of $k_1,k_2,a,b$. Therefore since $p(\theta|x)$ is proportional to $k_1e^{a}\times k_2e^{b}$, it is also proportional to just $e^ae^b$ (dropping constants, as you said). And this is just $e^{a+b}$.
Since $a$ and $b$ are quadratics in $\theta$, the final expression will also be a quadratic in $\theta$. The author is then expands out the binomials and obtains the resultin $A\theta^2+B\theta+C$ form:
\begin{align*} a+b &= \frac{-(\theta-\theta_0)^2}{2\phi_0}+\frac{-(x-\theta)^2}{2\phi} \\ &= \frac{-\theta^2+2\theta\theta_0-\theta_0^2}{2\phi_0}+\frac{-x^2+2x\theta-\theta^2}{2\phi} \\ &= -\frac12\theta^2\left(\frac{1}{\phi_0}+\frac{1}{\phi}\right) + \theta\left(\frac{\theta_0}{\phi_0}+\frac{x}{\phi}\right)-\frac12\left(\frac{\theta_0^2}{\phi_0}+\frac{x^2}{\phi}\right) \end{align*}
Note that the expression that the author has is $e^{A\theta^2+B\theta}$; so where did the $C$ term go? Well, we can in general write $$e^{A\theta^2+B\theta+C} = e^{A\theta^2+B\theta}e^C = Ke^{A\theta^2+B\theta},$$ where $K=e^C$ is a constant, and so $e^{a+b}$ is in turn proportional to $e^{A\theta^2+B\theta}$, which gets you to the last line.