Let $\beta=v_1,v_2,....,v_n$ and $\gamma=w_1,w_2,....,w_m$ be ordered bases of $V$ and $W$ respectively.
Hence the matrix corresponding to $f$ is indeed $A$.