Given the proportion a/b = c/d, the extremes are a and d.
The means are b and c.
To remember this, think about the terms of the proportion as being in order:
a, b, c, d. On the ends are a and d and are the extremes. Between the extremes are the means, b and c.