Extensionality - does ∀x[x ∈ y ⇔ x ∈ z] ⇔ ∀x[y ∈ x ⇔ z ∈ x] imply x and y are members of the same set? The lecture slides for my course define the Zermelo-Fraenkel axiom of extensionality as follows:
Slide 1:

Extensionality: x and y have the same elements

Slide 2:

∀x[x ∈ y ⇔ x ∈ z] iff x and y are members of the same sets

Slide 3:

∀x[x ∈ y IFF x ∈ z] iff ∀x[y ∈ x IFF z ∈ x]

I understand that "$∀x.[x ∈ y ⇔ x ∈ z]$" means $z$ and $y$ are the same set, but why does the formula in slide 3 implies that $x$ and $y$ are members of the same set?
I thought maybe it was a typo and they meant to say "z and y" instead of "x and y", but even then, I don't really understand why the right-hand side of the formula ($∀x[y ∈ x ⇔  z ∈ x]$) is needed. It does not appear in the definition given in the coursebook:

Extensionality. Two sets are equal if they have the same members.
$$(∀z, z ∈ x \ \ IFF \ \ z ∈ y) ⇒ x = y.$$

 A: Extensionality is the last formula of your post: $∀z(z∈a \leftrightarrow z∈b) \to a=b$ and reads: "if sets $a$ and $b$ have the same elements, they are equal".
To assert that "$a$ and $b$ are members of the same sets" we need: $\forall z (a \in z \leftrightarrow b \in za)$. As you can easily verify, the formula is different from 2) above.
Using Substitution axiom for equality [ in the form: $a=b \to (\varphi[a/w] \to \varphi [b/w])$ with formula $(w \in z)$ as $\varphi$], we derive: $a=b \to (a \in z \to b \in z)$.
Using $a=b \to b=a$ and Generalization we conclude with:

$a=b \to ∀z(a \in z \leftrightarrow b \in z)$.

Using Substitution axiom again we derive: $a=b \to ∀z(z∈a \leftrightarrow z∈b)$ that together with Extensionality produces:

$∀z(z∈a \leftrightarrow z∈b) \leftrightarrow a=b$.

Thus, the correct conclusion is:

$∀z(z∈a \leftrightarrow z∈b) \to ∀z(a \in z \leftrightarrow b \in z)$.

The gist is, provided the usual logical axioms for equality, that Extensionality implies that if two sets have the same elements, they are members of the same sets.
IMO we need some additonal principle, like e.g. Pair axiom, to conclude from $∀z(a \in z \leftrightarrow b \in z)$, by contradiction, that: $∀z(z∈a \leftrightarrow z∈b)$.
See also Equality in set theory.
