I'm new to discrete math so there might be problems with this solution. Prompt is to find at least one equivalence class if it is an equivalence relation.
$$X = R^2, (x_1, y_1) \sim (x_2, y_2) \iff y_1 = y_2$$
1. Reflexivity
$$(x_1, y_1) \sim (x_1, y_1) \iff y_1 = y_1$$
Since $y_1 = y_1$, it is reflexive.
2. Symmetry
$$(x_1, y_1) \sim (x_2, y_2) \iff y_1 = y_2$$
Assuming $y_1 = y_2$ (eqn1),
$$(x_2, y_2) \sim (x_1, y_1) \iff y_2 = y_1$$
from eqn 1, $y_2 = y_1$, so it is a symmetry.
3. Transitivity
$$(x_1, y_1) \sim (x_2, y_2) \iff y_1 = y_2$$
$$(x_2, y_2) \sim (x_3, y_3) \iff y_2 = y_2$$
Assuming $y_1 = y_2$ and $y_2 = y_3$, we get $y_1 = y_3$.
$$(x_1, y_1) \sim (x_3, y_3) \iff y_1 = y_3,$$
since $y_1 = y_3$, so it is transitive.
Is this the correct way to solve the problem? Also how to find the equivalence classes for the same?
You did correctly. Well.. to find the equivalent class, you often need a representant of that class. Take $(x, y)$, and we want $[(x, y)]$ to be an equivalent class which contains the element $(x, y)$. In other words, $(x, y)$ represents that class. That is: $$ [(x, y)] = \{(a, b)\in\mathbb{R}^2 : (x, y)\sim(a, b)\} $$
We have an equivalent class such that $(x, y)\in [(x, y)]$. Now, its all a matter of inserting the definition of $\sim$ in the set. $$ [(x, y)] = \{(a, b)\in\mathbb{R}^2 : y=b\} $$
Can you come up with a concrete example? What would $[(1, 2)]$ be, for instance?