It is similar for a two-factor ANOVA, but maybe not quite as simple as you
suggest.
If fixed factor A has $a$ levels, fixed factor B has $b$ levels, and there are $n$
replications in each of the $ab$ cells, then let the model be
$$Y_{ijk} = \mu + \alpha_i + \beta_j + \gamma_{ij} + e_{ijk},$$
where $\sum_i \alpha_i = \sum_j \beta_j = \sum_i \gamma_{ij} = \sum_j \gamma_{ij} = 0,$ and $e_{ijk} \stackrel{iid}{\sim} \mathsf{NORM}(0, \sigma).$
Then define $\theta_\alpha = \frac{1}{a-1}\sum_i \alpha_i^2$,
$\theta_\beta = \frac{1}{b-1}\sum_i \beta_i^2$, and
$\theta_\gamma = \frac{1}{(a-1)(b-1)}\sum_i \sum_j \gamma_{ij}^2.$ With this notation
EMS(A) = $\sigma^2 + bn\theta_\alpha,\,$ EMS(B) = $\sigma^2 + an\theta_\beta,\,$
EMS(Interaction) = $\sigma^2 + n\theta_\gamma,\,$ and EMS(Error) = $\sigma^2.$
The important consequence of these EMS's is that the three F-ratios for testing each of the fixed factors and their interaction all have MS(Error) in the
denominator.
The situation for models with a mixture of fixed and random effects is
more complicated, and even controversial. (The controversy results
from different kinds of restrictions on effect parameters, such as
$\sum_i \alpha_i = 0,$ but trickier for random effects.)
Many statistical software packages print out EMS tables, and (even if
not explicitly printed) use them to form appropriate F-ratios for various
F-tests.
The algebra for deriving EMS's can get a bit messy for more complex ANOVA
models, and there are algorithms for finding EMS's; one of these is
called the 'Bennett-Franklin' algorithm.
If you are taking a course in ANOVA designs, you should look for the
definitions and derivations of EMS's in your text.