A better explanation here can be each state in a FSM can store one bit. So we need to find the number of bits required in this case. Consider the m words as segments of memory and each word is divided into n bits. So the total number of bits are m*n. And each bit can be in two states. Hence the answer is $2^{m*n}$.Hence the answer for this particular question is $2^{3*8}$