Ans: A
Let $\$y\text{ kg}$ be the cost of flour of brand $Y$.
Let $\$y\text{ kg}$ be the cost of flour of brand $Y$.
$\begin{array}{rcl}
\dfrac{42 \times 3 + y \times 2}{3+2} & = & 36 \\
126 + 2y & = & 180 \\
2y & = & 54 \\
y & = & 27
\end{array}$
Therefore, the cost of flour of brand $Y$ is $\$27\text{ kg}$.