Grouped and aligned expressions

enter image description here

Bit of a cheat, but as all the lines have standard height

\documentclass{minimal}
\usepackage{mathtools}

\begin{document}

\begin{align*}
  f \colon \{\,\text{long expr}\,\} &\rightarrow B\\
  \left\{
    \begin{aligned}
      a_1 \\
      a_2 
    \end{aligned}
  \right.&
    \begin{aligned}
      &\mapsto b_1\\
      &\mapsto b_2
    \end{aligned}
\end{align*}

\end{document}

Here's a solution that uses nested array environments.

enter image description here

\documentclass{article}
\usepackage{newtxtext,newtxmath,array,amsmath}
\begin{document}
\[
\begin{array}{r@{\,}l}
f\colon\{\text{ long expr }\} & \to B \\
\left\{\begin{array}{@{}r@{}} a_1 \\ a_2 \end{array}\right. &
\begin{array}{@{}l@{}} \mapsto b_1 \\ \mapsto b_2\end{array}
\end{array}
\]
\end{document}