This is one of the questions I came across and I could only solve it partially. The question went
A man is randomly typing on a keyboard. Then, what is the probability that the word HEART comes before EARTH?
My attempts
The first $4$ letters of EARTH are the same as last 4 of HEART.
For EARTH to appear before HEART, any letter other than H must've appeared first and then should be followed by EART and then a H later on.
For HEART to appear first before EARTH, only the letter H must've appeared first and then may be followed by EART.
Since, the number of letters to appear in the case of HEART is less than EARTH, the probability of occurrence of HEART is more than that of EARTH.
To calculate how much, I'm just considering in case of
EARTH first: $$P(E)=\frac{25}{26}.\frac{1}{26}.\frac{1}{26}.\frac{1}{26}$$
HEART first: $$P(E)=\frac{1}{26}.\frac{25}{26}.\frac{25}{26}.\frac{25}{26}$$
This obviously isn't correct, since it doesn't give any individual probability for the occurrence of each letter.
So, can anyone calculate the probability for each of these two?