Outline: The correlation coefficient of $X$ and $Y$ is equal to
$$\frac{\text{Cov}(X,Y)}{\sqrt{\text{Var}(X)\text{Var}(Y)}}.$$
First we compute $\text{Var}(X)$. Note that $X$ takes on value $1$ with probability $\frac{1}{4}$, value $4$ with probability $\frac{2}{4}$, and value $7$ with probability $\frac{1}{4}$. I assume that now you can compute $E(X)$, and $E(X^2)$, and therefore $\text{Var}(X)$.
Now $Y$ is no trouble! For any of our numbers is just as likely to be third as it is to be first, so $Y$ has the same distribution as $X$.
It remains to calculate $\text{Cov}(X,Y)$, which is $E(XY)-E(X)E(Y)$. The only thing we don't yet know is $E(XY)$.
For this, we need to know the joint distribution of $X$ and $Y$.
For example, $\Pr(X=1\cap Y=4)=\frac{2}{12}$. The easiest way to see this is that the probability the first is $1$ is $\frac{1}{4}$, and given this has happened, the probability that $Y=4$ is $\frac{2}{3}$.
Do a similar calculation for $\Pr(X=1\cap Y=7)$, $\Pr(X=4\cap Y=1)$, $\Pr(X=4\cap Y=4)$, and so on. The work will be easier if you note that the probability that the first is $a$ and the third is $b$ is the same as the probability that the first is $a$ and the second is $b$. Finally,
$$E(XY)=(1)(4)\Pr(X=1\cap Y=4)+(1)(7)\Pr(X=1\cap Y=7)+\cdots.$$
Remark: The list you gave gives the conditional probability that $Y=y$ given that $X=x$. It can be thought of as a component of the calculation of the $\Pr(X=x\cap Y=y)$ that we need in order to calculate $E(XY)$.