For (a), $\phi(x + y) = 3(x+y) - 1 = 3x + 3y - 1$, and $\phi(x)\ast\phi(y) = (3x-1)\ast(3y-1)$ so $(3x-1)\ast(3y-1) = 3x + 3y - 1$, which is what you have written.
In order to determine $(3x)\ast(3y)$ from $(3x-1)\ast(3y-1) = 3x + 3y -1$, we need to write $3x$ in the form $3x'-1$ and $3y$ in the form $3y'-1$. We can do this as follows:
$$(3x)\ast(3y) = \left(3\left(x+\frac{1}{3}\right)-1\right)\ast\left(3\left(y+\frac{1}{3}\right)-1\right) = 3x + 3y + 1,$$
which you have also written. The last step is to determine $x\ast y$ from $(3x)\ast(3y) = 3x+3y+1$, so we need to write $x$ in the form $3x'$ and $y$ in the form $3y'$. We can achieve this using $x = 3\left(\frac{1}{3}x\right)$ and $y = 3\left(\frac{1}{3}y\right)$. Then we have:
$$x\ast y = \left(3\left(\frac{1}{3}x\right)\right)\ast \left(3\left(\frac{1}{3}y\right)\right) = 3\left(\frac{1}{3}x\right) + 3\left(\frac{1}{3}y\right) + 1 = x + y + 1.$$
This really is the same method as what the solution gave, except it, in my opinion, the solution is more direct. We want to define a new binary operation $\ast$ on $\mathbb{Q}$, so we need to determine what $x\ast y$ is. In order to do this, we need to write $x$ in the form $3x'-1 = \phi(x')$ and similarly for $y$. Then we can use the fact that we want $\phi$ to be an isomorphism.