about the definition of extended ideals Let $A, B$ be  commutative rings with multiplicative identity, let $f: A \rightarrow B$ be a ring homomorphism, let $\mathfrak{a}$ be an ideal in $A$. The extension $\mathfrak{a}^\text{e}$ of $\mathfrak{a}$ in $B$ is defined to be the ideal generated by $f(\mathfrak{a})$ in $B$; in other words, it is given by the set
\begin{align}
\mathfrak{a}^\text{e} := \left\{ \sum\limits_{i=1}^n y_i f(x_i) \ \middle\vert \ n \in \mathbb{N}, x_i \in \mathfrak{a}, y_i \in B \right\}. \tag{1}
\end{align} 
In the book by Atiyah and MacDonald, I found the following sentence:

We define the extension $\mathfrak{a}^\text{e}$ of $\mathfrak{a}$ to be the ideal $Bf(\mathfrak{a})$ generated by $f(\mathfrak{a})$: explicitely, $\mathfrak{a}^\text{e}$ is the set of all sums $\sum_i y_i f(x_i)$, where $x_i \in \mathfrak{a}, y_i \in B$.

This confuses me. They also define the extension of an ideal as the ideal generated by its image. However, they use, for some reason, the notation $Bf(\mathfrak{a})$ for it, which for me should be something like
\begin{align}
Bf(\mathfrak{a}) = \left\{ y f(x) \mid y \in B, x \in A \right\}. \tag{2}
\end{align}
This set (2) does not, in general, coincide with the set $\mathfrak{a}^\text{e}$ as defined above in (1), right? I can't come up with an example where the two differ, though.
Question 1: What would be an example where the two sets differ?
Question 2: Now, which of the two is the extension of an ideal? If it is (1), then why is the notation $Bf(\mathfrak{a})$ used?
 A: You are basically asking the following: Let $I$ and $J$ two ideals. We can define
$$(1)\hspace{1in} IJ = \{\text{set of all elements of the form $ij$ for $i \in I$ and $j\in J$}\}$$
or alternatively as 
$$(2)\hspace{1in} IJ = \{ \text{set of all finite sums $\sum i_kj_k $ where $i_k \in I$, $j_k \in J$}\}.$$
The problem with giving the first definition is that the set defined in the R.H.S. of (1) is not an ideal. To see this consider the ring $R =\Bbb{Z}[x,y,z]$ and ideals $I = (xy,zx)$ and $J= (yz,2)$. If $IJ$ in definition (1) is an ideal then we have
$$2xy + yz^2x = xy(2+z^2) \in IJ.$$
Now note that because $\Bbb{Z}[x,y,z]$ is a UFD the representation of $2xy + yz^2x$ as a product is unique up to multiplication by $\pm 1$. We know $xy \in I$ but now I claim $2 + z^2 \notin J$. If it were in $J$ then $z^2$ would be in $J$ which is not the case.
As for question (2), the notation $Bf(\mathfrak{a})$ is used because of the definition of the product of two ideals in accordance with my second definition above.
