You have to think to a 3x3 matrix and the rest follows.
In the top left corner you place B and the other items in the 2x2 bottom right corner. Thus the skeleton is
\begin{tikzcd}
B \\
& Q & A \\
& B & C
\end{tikzcd}
Now you want to add the arrows. There are three of them starting from the top left corner and the others are easy to add.
\begin{tikzcd}
B \arrow[ddr] \arrow[drr] \arrow[dr,dashed] \\
& Q \arrow[r] \arrow[d] & A \arrow[d] \\
& B \arrow[r] & C
\end{tikzcd}
Now we want to add the labels
\begin{tikzcd}
B \arrow[ddr,"\mathrm{Id}"] \arrow[drr,"h"] \arrow[dr,dashed,"\beta"] \\
& Q \arrow[r,"q"] \arrow[d,"g^*"] & A \arrow[d,"f"] \\
& B \arrow[r,"g"] & C
\end{tikzcd}
OK, now we clearly see that bending the outer arrows is really necessary. Also the “Id” label should go on the opposite side and the "g*" label should be moved slightly higher, which can be accomplished by smashing the bottom of the "Q”.
\begin{tikzcd}
B \arrow[ddr,bend right,"\mathrm{Id}"'] \arrow[drr,bend left,"h"] \arrow[dr,dashed,"\beta"] \\
& \smash[b]{Q} \arrow[r,"q"] \arrow[d,"g^*"] & A \arrow[d,"f"] \\
& B \arrow[r,"g"] & C
\end{tikzcd}