$\text{ if we can write 2 matrices A and B as $A=M^{-1}BM$ for some invertible matrix M}$
$\text{then they are called conjugate.}$
$\text{Consider, 2 matrices A and B as :}$
$\text{$A= \begin{pmatrix} x &0 \\ 0&y \end{pmatrix}$ and $B= \begin{pmatrix} x &1 \\ 0&y \end{pmatrix}$}$
$\text{Since, for matrix B, eigenvalues are x and y where $x \neq y $ (distinct eigen values)}$
$\text{So, matrix B is diagonalizable.}$
$\text{It means I can write B as $B=PDP^{-1}$, where matrix P is made of eigen vectors and}$
$\text{matrix D is made of eigen values which are in the diagonal }$
$\text{Eigen vectors of B are $\begin{pmatrix} 1\\0 \end{pmatrix}$ for eigen value x}$
$\text{and $\begin{pmatrix} \frac{-1}{x-y}\\1 \end{pmatrix}$ for eigen value y}$
$\text{So, matrix $P=\begin{pmatrix} 1 &\frac{-1}{x-y} \\ 0&1 \end{pmatrix}$ and $D=\begin{pmatrix} x &0 \\ 0&y \end{pmatrix}$}$
$\text{So, I can write $B=PDP^{-1}$}$
$\text{Here, matrix D is same as matrix A}$
$\text{So, $B=PAP^{-1}$}$
$\text{So, $BP=PA$}$
$\text{So, $P^{-1}BP=A$}$
$\text{Hence, matrices A and B are conjugate.}$