This is a case where mathematics is assisted by precise English usage. I will tease it apart and try to illustrate with a specific example.
A is a set of elements.
B is a second set of elements.
f is the name of a function that maps each element in A onto one of the elements in B.
In other words, f is the name of a defined operation by which we relate all elements of A to some (not necessarily all) of the elements of B.
Consider a simple example. I put all the elements as bold:
Let’s imagine A is the set {1, 2, 3, 4} and B is the set of all positive integers {1, 2, 3, 4, …}.
Now imagine f to be a function that maps any number onto its square.
So applying f to the set A {1, 2, 3, 4} → {1, 4, 9, 16}.
{1, 4, 9, 16} is a subset of B, and therefore every element of A is mapped to exactly one element of B.
Now consider the prose.
If a is a member of the set A, the operation f (a) means “map a to the corresponding element of B”.
In my example we would have f (2) → 4.
4 is therefore the element of B referred to by f (2).
Or, to put it as in your example, 4 is the element of B to which 2 is assigned by f.
In an annotated version of the same statement:
4 [an element in B] is the element of B to which [referring to the relevant element in B] 2 [an element in A] is assigned by f [the mapping of a number to its square].
It may help if I illustrate the example with a picture: