Given the vector spaces $V,V',W,W'$ of different dimensions and maps $g,g',f_0,f_1$ in the commutative diagram above, what is the basis of the cokernels $W/im(g)$ and $W'/im(g')$?
The dimensions are simply $$dim(W/im(g)) = dim(W) -dim(im(g))$$ and $$dim(W'/im(g')) = dim(W') - dim(im(g'))$$
Is there any way to state anything more about these spaces? I was wondering if the dimensions may be equal, since the diagram is commutative, but I haven't been able to prove it.
EDIT: Letting $$g = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0& 0 \end{bmatrix}$$
$$f_1 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0& 0 \end{bmatrix}$$
$$f_0 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0& 1 \end{bmatrix}$$
$$g' = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0& 0 \end{bmatrix}$$
Gives
\begin{align} &W\im(g) = span{\begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}} \\ &W'\im(g') = span{\begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}} \end{align}
So the dimensions are not always equal. In this case $f_1 = g'$ which forces $f_2$ to be the zero map. There are however cases where $f_1 != g'$ and $f_2$ is a matrix. I am unsure how to make any more general statements about the diagram than this.

Take your preferred linear map $f_1\colon W\to W'$. No constraints whatsoever on it.
Now take $V=V'=\{0\}$, so you can uniquely fill in a commutative diagram as in your picture and $f_2$ will be the same as $f_1$, that is, completely arbitrary.
So no general statement can be done about the horizontal arrows; the standard rank-nullity theorem holds for the vertical arrows, as you noticed.
For other situations, there's nothing that prevents $g'$ from being surjective, forcing $W'/\operatorname{im}(g)=\{0\}$. Here $W/\operatorname{im}(g)$ could be anything at all.