A complex number takes the form #z=a+bi#.
In this example, #a=0# and #b=3# because #z=0+3i#.
To find #r#, use the pythagorean theorem.
#r=sqrt(a^2 +b^2)#.
#r=sqrt(0^2 +3^2) = 3#
To find #theta#, think about #a# as a value along the x-axis, and #b# as a value along the y axis. In this case, #a# is zero. So, we have a point on the positive y axis, which implies #theta=pi/2#.
Substitute r and theta into #z=r(costheta+isintheta)#
#z=3(cos(pi/2) + isin(pi/2))#
Of course, #cos(pi/2) = 0#, so some teachers would give the answer as #z=3isin(pi/2)#.