Equivalence class is defined for equivalence relations. Hence the relation is reflexive, symmetric and transitive.
Equivalence classes divide the domain into the partition. In a partition an element can be present at only one partition. Or in other word in equivalences classes no element is present in two class.
An element in the equivalence class is related to all the other element in that equivalence class and with itself also.
Let E1 be the one of the equivalence class of equivalence relation R . E1 = {1, 2, 3, 4, 5}.
(1,1), (2,2) ... so on should be present in R. As size of equivalence class is 5 so 5 such order pair is present in R.
As every element in equivalence class is related to all the other element in equivalence class. If we pick any two element they must be related to each other in R.
For ex: I pick 1, 2 then they will be related as (1, 2) and (2, 1) in R. (As R is symmetric).
Now in how many way we can pick 2 element among this 5 element is $\binom{5}{2}$. And multiply this with 2 because of symmetry.
So for 5 element = 5 + $\binom{5}{2}$ * 2 = 25
For 6 element = 6 + $\binom{6}{2}$ * 2. = 36
For 7 element = 7 + $\binom{7}{2}$ * 2 = 49.