Solution (source code)

= Solution

Realize the <B2 root system> in $\mathbb R^2$ as
$$
\{\pm\varepsilon_1,\pm\varepsilon_2,
\pm\varepsilon_1\pm\varepsilon_2\}.
$$
Choose the short simple root and long simple root
$$
\alpha_1=\varepsilon_2,
\qquad
\alpha_2=\varepsilon_1-\varepsilon_2.
$$
Then
$$
\omega_1=\frac12(\varepsilon_1+\varepsilon_2),
\qquad
\omega_2=\varepsilon_1,
$$
as follows from $\langle\omega_i,\alpha_j^\vee\rangle=\delta_{ij}$. The roots form a square from the long roots with the four short roots on the coordinate axes; the double edge in the Dynkin diagram points toward $\alpha_1$.

The positive roots are
$$
\alpha_1,quad\alpha_2,quad
\alpha_1+\alpha_2,quad2\alpha_1+\alpha_2.
$$
For $\lambda=a\omega_1+b\omega_2$, substituting their coroot pairings in the <Weyl dimension formula> gives
$$
\boxed{
\dim V(\lambda)=
\frac{(a+1)(b+1)(a+b+2)(a+2b+3)}6}.
$$
This is the <Weyl dimension formula for B2>.