(a)
$ \cos z = (\cos x)(\cosh y) - i(\sin x)(\sinh y) $
$ u(x,y) = (\cos x)(\cosh y) v(x,y) = -(\sin x)(\sinh y) $
$ when y =q $
$ u(x,q) = (\cos x)(\cosh q) = a(\cos x) $
$ v(x,q) = -(\sin x)(\sinh q) = b(\sin x) $
$ \frac{u^2}{a^2} = (cosx)^2 $ $ \frac{v^2}{b^2} = (sinx)^2 $
$ \frac{u^2}{a^2} + \frac{v^2}{b^2} = (cosx)^2 + (sinx)^2 = 1 $
So, lines {z: Imz = q} are mapped onto confocal ellipses {w=u+iv: $ \frac{u^2}{a^2} + \frac{v^2}{b^2} = 1 $} with $ a^2 - b^2 = 1 $ since $ (coshq)^2 - (-sinhq)^2 = 1 $
$ a = \cosh q $
$ b = -\sinh q $