My clue is just to expand brackets and obtain coefficients of numerator and denominator of my transfer function. Am I right?
This might look trivial, but with the pole-zero diagram alone one can get the transfer function with a scale (gain) ambiguity.
That is, all transfer functions $(Kb,a)$, where $K$ is a constant, have the same pole-zero representation. For this reason, we usually use pole-zero-gain terminology.