Need to find the formula for the elements of a unitary matrix $U$.

You're on the right track. To find $u_c$, note that $$ (A - c I)u_c = 0 \implies \pmatrix{a-c&b\\0&0}u_c = 0. $$ With that, we can conclude that $u_c$ a multiple (in particular a unit vector in the direction of) $(b,-(a-c))$. From there, note that $u_a$ must be a unit vector that is orthogonal to $u_c$. Putting it all together, we find that $$ u_c = \frac{e^{i\theta_c}}{\sqrt{1 + |\frac{a-c}{a}|^2}}\left(1, -\frac{a-c}{b}\right), \quad u_a = \frac{e^{i\theta_a}}{\sqrt{1 + |\frac{a-c}{a}|^2}}\left(\frac{\bar a-\bar c}{\bar b},1\right) $$ for some real numbers $\theta_a,\theta_c$. Choosing $\theta_a = \theta_c = 0$ leads to a solution close to that which you presented.