Let $Y$ be the cyclic group of order $q$ and $X$ be the cyclic group of order $p^2$, generated by $y$ and $x$ respectfully. $|\text{Aut}(Y)|=q-1$, so because $p\mid q-1$ we have by Cauchy's that there is an element $\sigma\in \text{Aut}(Y)$ of order $p$. (In particular, $x\mapsto x^a$, where $a$ is as described by the problem statement, is such an automorphism.) Since $X$ is cyclic, it contains a normal subgroup of order $p$ (namely $\langle x^p \rangle$), and thus we can define a homomorphism $\lambda:X\rightarrow \text{Aut}(Y)$ so that $X/\text{ker}(\lambda)\cong \langle \sigma \rangle$. Forming the semidirect product $G=Y\rtimes_\lambda X$ yields the desired group.
That answers part (a) and the first part of (b). For the second part of (b), we have that $\text{ker}(\lambda)=\langle x^p \rangle$ acts trivially on $Y$, so $\langle y \rangle \times \langle x^p\rangle$ is the unique subgroup of order $pq$ in $G$ by construction.