Thanks to the dotted circle notation of Professor Akbulut, we can easily (compare with your picture) draw the handle diagram of a typical Mazur manifold as follows:
Since $1$-handles and $2$-handles respectively give the generators and relations of the fundamental group of a $4$-manifold, we have (for my $W$): $$\pi_1(W) = \langle \alpha \ \vert \ \alpha^2 \alpha^{-1} \rangle = 1.$$
The boundary $3$-manifold $\partial W$ is already in the picture. Further, we can compute $\pi_1(\partial W)$ from the diagram by using Wirtinger's presentation.
Because today is Sunday (which makes me so lazy) and Eylem already did such a computation (another purpose but for a Mazur manifold) in Example 1 in [Yıldız, 2018], the rest is for you, mimic the argument by keeping Ryan Budney's comments in your mind:
Bonus: In particular, $W$ is a contractible $4$-manifold: By using Mayer-Vietoris sequences, observe that $W$ is a homology $4$-ball, i.e., we have $H_*(W, \mathbb{Z}) = H_*(B^4, \mathbb{Z})$. Then apply the classical theorems of Hurewicz and Whitehead.
Bonus 2: Since $W$ is contractible, $\partial W$ must be a homology $3$-sphere, i.e., $H_*(\partial W, \mathbb{Z}) = H_*(S^3, \mathbb{Z})$. Using Kirby calculus, show that $\partial W \approx \Sigma(2,5,7)$ where $\Sigma(p,q,r)$ denotes the Brieskorn sphere given coprime positive integers $p,q$ and $r$.