> Is this wrong?
Yes. Among other issues, closely examine the scope of each existential. You have unbound instances of several tokens.
You wish to express that "There are two students, who are not the same, and if any student is not one of them†, each of them has either mailed or phoned that third student." This has the form:
$$\exists x~\exists y~\forall z~\Big(A(x,y)\wedge \big(B(x,y,z)\to C(x,y,z)\big)\Big)$$
Now just determine what to use in place of the Predicate functions $A,B,C$.
* * *
$\dagger$ assuming "everyone else in the class" means "every other than the pair" rather than "everyone other than themself". The later would have the form:
$$\exists x~\exists y~\forall z~\Big(A(x,y)\wedge \big(B(x,z)\to C(x,z)\big)\wedge\big(B(y,z)\to C(y,z)\big)\Big)$$