Hints :
We want to express the scalar operator
\begin{equation}
\left(\mathbf{P}-\dfrac{q}{c}\mathbf{A}\right)^{2}
\tag{01}
\end{equation}
in cylindrical coordinates. We'll use the symbols $\:\rho,\varphi,z\:$ for the cylindrical coordinates and $\:\mathbf{e}_{\rho},\mathbf{e}_{\varphi},\mathbf{e}_{z}\:$ for the unit vectors.
Note that $\:\mathbf{P}\:$ is the linear momentum operator, a vector operator
\begin{equation}
\mathbf{P}=-\mathrm{i}\,\hbar \boldsymbol{\nabla}
\tag{02}
\end{equation}
which expressed in cartesian coordinates $\:x,y,z\:$ is
\begin{equation}
\mathbf{P}=-\mathrm{i}\,\hbar \boldsymbol{\nabla}=-\mathrm{i}\,\hbar \left(\dfrac{\partial}{\partial x},\dfrac{\partial}{\partial y}, \dfrac{\partial}{\partial z}\right)
\tag{03}
\end{equation}
and $\:\mathbf{A}\:$ is a vector operator which in the present case is
\begin{equation}
\mathbf{A}=\left(A_{\rho},A_{\varphi},A_{z}\right)=\left(0,\tfrac{1}{2}\rho B, 0\right)=\tfrac{1}{2}\rho B \mathbf{e}_{\varphi}
\tag{04}
\end{equation}
already in cylindrical coordinates.
Now, the scalar operator (01) is
\begin{align}
\left(\mathbf{P}-\dfrac{q}{c}\mathbf{A}\right)^{2}
&=\left(\mathbf{P}-\dfrac{q}{c}\mathbf{A}\right)\boldsymbol{\cdot}\left(\mathbf{P}-\dfrac{q}{c}\mathbf{A}\right)=\mathbf{P}\boldsymbol{\cdot}\mathbf{P}-\dfrac{q}{c}\,\mathbf{P}\boldsymbol{\cdot}\mathbf{A}-\dfrac{q}{c}\,\mathbf{A}\boldsymbol{\cdot}\mathbf{P} +\left(\dfrac{q}{c}\right)^{2}\mathbf{A}\boldsymbol{\cdot}\mathbf{A}\\
&=\mathbf{P}^{2}-\dfrac{q}{c}\,\mathbf{P}\boldsymbol{\cdot}\mathbf{A}-\dfrac{q}{c}\,\mathbf{A}\boldsymbol{\cdot}\mathbf{P}+\left(\dfrac{q}{c}\right)^{2}\mathbf{A}^{2}\\
&=-\hbar^{2}\nabla^{2}+\mathrm{i}\,\hbar\dfrac{q}{c}\,\boldsymbol{\nabla}\boldsymbol{\cdot}\mathbf{A}+\mathrm{i}\,\hbar\dfrac{q}{c}\,\mathbf{A}\boldsymbol{\cdot}\boldsymbol{\nabla}+\left(\dfrac{q}{c}\right)^{2}\mathbf{A}^{2}
\end{align}
that is
\begin{equation}
\left(\mathbf{P}-\dfrac{q}{c}\mathbf{A}\right)^{2}=-\hbar^{2}\nabla^{2}+\mathrm{i}\,\hbar\dfrac{q}{c}\left(\boldsymbol{\nabla}\boldsymbol{\cdot}\mathbf{A}\right)+\mathrm{i}\,\hbar\dfrac{q}{c}\left(\mathbf{A}\boldsymbol{\cdot}\boldsymbol{\nabla}\right)+\left(\dfrac{q}{c}\right)^{2}\mathbf{A}^{2}
\tag{05}
\end{equation}
So, our exercise is to express the scalar operator $\:\nabla^{2}\:$ and the vector operator $\:\boldsymbol{\nabla}\:$ in cylindrical coordinates given that these operators in cartesian coordinates are
\begin{align}
\nabla^{2} & = \dfrac{\partial ^{2}}{\partial x^{2}}+\ \dfrac{\partial ^{2}}{\partial y^{2}}+ \dfrac{\partial ^{2}}{\partial z^{2}}
\tag{06a}\\
\boldsymbol{\nabla} & =\left(\dfrac{\partial}{\partial x},\dfrac{\partial}{\partial y}, \dfrac{\partial}{\partial z}\right)
\tag{06b}
\end{align}
and
\begin{align}
x & = \rho \cos \varphi
\tag{07a}\\
y & = \rho \sin \varphi
\tag{07b}\\
z & = z
\tag{07c}
\end{align}
Check your results with the following :
\begin{align}
\nabla^{2}\psi & = \dfrac{1}{\rho}\dfrac{\partial}{\partial \rho}\left(\rho\,\dfrac{\partial \psi}{\partial \rho}\right)+\dfrac{1}{\rho^{2}}\dfrac{\partial ^{2} \psi}{\partial \varphi^{2}}+\dfrac{\partial ^{2} \psi}{\partial z^{2}}
\tag{08a}\\
\boldsymbol{\nabla}\psi & = \dfrac{\partial \psi}{\partial \rho}\mathbf{e}_{\rho} +\dfrac{1}{\rho}\dfrac{\partial \psi}{\partial \varphi}\mathbf{e}_{\varphi}+\dfrac{\partial \psi}{\partial z }\mathbf{e}_{z}=\left( \dfrac{\partial }{\partial \rho},\dfrac{1}{\rho}\dfrac{\partial }{\partial \varphi},\dfrac{\partial }{\partial z }\right)\psi
\tag{08b}\\
\boldsymbol{\nabla}\boldsymbol{\cdot}\mathbf{A} & =\dfrac{1}{\rho}\dfrac{\partial}{\partial \rho}\left(\rho\,A_{\rho}\right)+\dfrac{1}{\rho}\dfrac{\partial A_{\varphi}}{\partial \varphi}+\dfrac{\partial A_{z}}{\partial z}
\tag{08c}
\end{align}
