I Vector to scalar potential, transformation of fields

Hey guys. So, as i was going through Griffith's Electrodynamics, and i came across this problem:

In the solutions:

How to they actually get to that expression for V = (V(bar)+vAx(bar) )Ɣ? I understand everything after that, but this just made me very confused. How do they get this from the inverse Lorentz transformations?

The Lorentz transformation that goes from ##S## to ##\bar S## is given by the matrix:
$$\Lambda(S\rightarrow \bar S)=\begin{pmatrix}\gamma& -\beta\gamma & 0 & 0\\ -\beta\gamma &\gamma&0&0\\ 0&0&1&0\\ 0&0&0&1\\
\end{pmatrix} $$
The inverse is simply:

$$\Lambda(\bar S\rightarrow S)=\begin{pmatrix}\gamma& \beta\gamma & 0 & 0\\ \beta\gamma &\gamma&0&0\\ 0&0&1&0\\ 0&0&0&1\\
\end{pmatrix} $$
You can easily verify this by multiplying these two in any order and using ##\gamma=1/\sqrt{1-\beta^2}##. Basically it's the transformation with the velocity in the opposite direction, so ##\beta\rightarrow -\beta##, while ##\gamma## doesn't change since it's quadratic. If you take into account that
$$
\bar A^\mu=\begin{pmatrix}\bar V/c\\ \bar A_x \\ \bar A_y \\ \bar A_z\\
\end{pmatrix} $$

and ##A=\Lambda(\bar S \rightarrow S)\bar A##, you should be able to get the desired result.