In the following diagram $ f,g$ are isomorphisms and $ \pi, \tau$ are canonical projections. Is the diagram then commutative ?

$ $ \newcommand{\ra}[1]{\kern-1.5ex\xrightarrow{\ \ #1\ \ }\phantom{}\kern-1.5ex} \newcommand{\da}[1]{\left\downarrow{\scriptstyle#1}\vphantom{\displaystyle\int_0^1}\right.} % \begin{array}{ll} A & \ra{g} &B \ \da{\pi} & &\da{\tau}\A’ & \ra{f} &B’ \end{array} $ $

($ A, B$ are groups) What if $ \pi$ and $ \tau$ are just surjective ?