Composition and union are right.

\\[ A^1 = \left( \begin{array}{cc} \lbrace f \rbrace & \lbrace g \rbrace \\\\ \lbrace h \rbrace & \emptyset \end{array} \right) \\]

\\[ A^2 = \left( \begin{array}{cc}
\lbrace f;f, \; g;h \rbrace & \lbrace f;g \rbrace \\\\
\lbrace h;f \rbrace & \lbrace h;g \rbrace \end{array} \right) \\]