When you flip the first coin there are two equally probable results: $\rm H$ or $\rm T$. The probability for each is $1/2$.
Now if that result was a head (half of the total probability), you must flip the coin a second time, and again there are two equally probable results branching from that point. This give the probabilities of two of the outcomes $\rm (H,H), (H,T)$ as each being half of the half: $1/4$.
Now if the first toss were a tail, you would toss a die. This time their would be six outcomes branching off that initial result, all equally likely from that point. This give the probabilities of these remaining six outcomes $\rm (T,1), (T,2), (T,3), (T,4), (T,5), (T,6)$ as each being $1/12$.
This is nothing more than the definition of conditional probability.
$$\mathsf P((X,Y){=}(x,y)) ~=~ \mathsf P(X{=}x)~\mathsf P(Y{=}y\mid X{=}x)\\\mathsf P((X,Y){=}({\rm T},6)) ~=~ \mathsf P(X{=}{\rm T})~\mathsf P(Y{=}6\mid X{=}{\rm T})
\\=~\tfrac 1 2\times \tfrac 16$$
And such.
PS: the probability that there die shows greater than 4 given that there is at least one tail is obviously:
$$\mathsf P(Y\in\{5,6\}\mid X{=}{\rm T}\cup Y{=}{\rm T})=\dfrac{\mathsf P((X,Y)\in\{~({\rm T},5),({\rm T},6)~\}) }{\mathsf P((X,Y)\in\{~({\rm H},{\rm T}),({\rm T},1),({\rm T},2),({\rm T},3),({\rm T},4)({\rm T},5), ({\rm T},6)~\})}$$
I think you want to find the number of ordered pairs $(A,B)$ such that $A\subseteq S$ ($A$ is a subset of $S$), $B\subseteq S$, and $A\cap B\ne \emptyset$.
First we count the number of ordered pairs $(A,B)$ of subsets of $S$. There are $2^n$ choices for $A$, and for each such choice there are $2^n$ choices for $B$, for a total of $2^{2n}$, that is, $4^n$.
Now we count the bad ordered pairs, the ones where $A\cap B=\emptyset$.
To make such an ordered pair, for every $k\le n$ we have $3$ choices for what to do with $k$: (i) $k\in A$ and $k\not\in B$; (ii) $k\in B$ and $k\not\in A$; (iii) $k$ in neither $A$ nor $B$. So there are $3^n$ bad ordered pairs.
It follows that the required number of ordered pairs is $4^{n}-3^n$.
Remark: Your procedure is either correct or nearly correct. You also went after the "bad" pairs. Using the binomial theorem on your sum should give us $3^n$, or something close to that.
Best Answer
Given condition is |A|>|B| , A and B are independent events which gives total number of ordered pairs (A,B) = 422