Find: $~Cov(X,Y)~$ and $ρ_{X,Y}$ Flip a coin thrice ($3$ times), and let  $X$  and  $Y$  denote the number of heads in the first two flips, and in the last two flips, respectively. For example, if the coins turn up $h,h,t$ then  $X=2$  and  $Y=1$ , while if they turn up $t,t,h$ then  $X=0$  and  $Y=1$ . Find: $Cov(X,Y)$  and $ρ_{X,Y}$ .


I Have tried this approach but my answer comes wrong(ans $~Cov(X,Y)=1.522 ,~~X,~Y =0.5~$) please some correct me.

Let Z be the count of heads in the middle flip. On noting, among other things, that X,Y are conditionally independent given $~Z~$, you may now use the Law of Total Covariance $$\mathsf {Cov}\big(X,Y\big)=\mathsf E\big(\mathsf {Cov}(X,Y\mid Z)\big)+\mathsf{Cov}\big(\mathsf E(X\mid Z),\mathsf E(Y\mid Z)\big)$$

$$\rho_{\small X,Y}=\dfrac{\mathsf{Cov}(X,Y)}{\surd\mathsf {Var}(X)\cdot\surd\mathsf{Var}(Y)}$$
Using the law of total covariance as suggested in the question, the first term is zero because the conditional covariance of $X$ and $Y$ given $Z$ is zero.  For the second term, we note $$\operatorname{E}[X \mid Z] = Z + p, \quad \operatorname{E}[Y \mid Z] = Z + p,$$ where $p$ is the probability of observing heads for a single toss.  Here, we are assuming tosses of the same coin are independent and identically distributed.  Then $$\operatorname{Cov}[Z + p, Z + p] = \operatorname{Var}[Z + p] = \operatorname{Var}[Z] = p(1-p).$$  It follows that $$\operatorname{Cov}[X, Y] = p(1-p).$$  I leave the rest as an exercise.
You make things quite strangely. Moreover, no one could have guess that $\rho_{X,Y}$ denotes the correlatin, so be precise next time. 

Hint on how to solve your problem


Find the joint distribution $f_{X,Y}(k,\ell):=\mathbb P\{X=k,Y=\ell\}$, $k,\ell\in \{0,1,2\}$.
Then, $$\text{Cov}(X,Y)=\mathbb E[XY]-\mathbb E[X]\mathbb E[Y],$$
where $$\mathbb E[XY]=\sum_{k,\ell\in \{0,1,2\}}k\ell\mathbb P\{X=k,Y=\ell\}.$$
I let you do for the correlation.