this is table of conditional probability
city B
$city A\begin{align} \ P (city B|city A)&& B=sunny && B=Rain \\A=sunny &&\frac{4}{5} && \frac{1}{5} \\ A=Rain &&\frac{1}{2}&&\frac{1}{2} \\ \end{align}$
i know that $P(city A=sunny)=p(B=rain).p(A=sunny|B=rain)+p(B=sunny).p(A=sunny|B=sunny)$ and $P(B=sunny|A=sunny)=0.8=\frac{p(city A=sunny|city B=sunny).p(city B=sunny)}{P(city A=sunny)}$
but how can i find joint distribution given that $p(A,B)$ from the table such as $p(A=sunny,B=sunny)$, $p(A=sunny,B=rain)$ ,$p(A=rain,B=sunny)$, $p(A=rain,B=rain)$?
For brevity let $s:=\text{sunny}$ and $r:=\text{rain}$.
You have been given $\def\P{\operatorname{\mathsf P}}\P(B{=}s\mid A{=}s)=0.8\qquad \P(B{=}r\mid A{=}s)=0.2\\\P(B{=}s\mid A{=}r)=0.5\qquad\P(B{=}r\mid A{=}r)=0.5$
And know the Law of Total Probability. $$\P(B{=}s)=\P(B{=}s\mid A{=}s)\P(A{=}s)+\P(B{=}s\mid A{=}r)\P(A{=}r)\\\P(B{=}r)=\P(B{=}r\mid A{=}s)\P(A{=}s)+\P(B{=}r\mid A{=}r)\P(A{=}r)$$
Now you wish to find $\mathsf P(A{=}s)$ and $\mathsf P(B{=}s)$.
Well just let $x:=\P(A{=}s)$ and $y:=\P(B{=}s)$ and use the above to obtain two simultaneous equations in these two unknowns, then solve.
And of course $\P(A{=}s,B{=}s)=\mathsf P(B{=}s\mid A{=}s)\P(A{=}s)$ et cetera.$$\P(A{=}s,B{=}s)=0.8x$$