You are right, adding " in first attempt" makes the question more precise and unambiguous.
The wording of the question is misleading. "What is the probability that Ram got 3 or more heads on consecutive tosses?" amounts to asking "What is the probability that Ram wins?" It doesn't ask "What is the probability that Ram got 3 or more heads on consecutive tosses in the first attempt?"
When someone wins, the game ends. If Ram gets 3 or more heads on consecutive tosses, he will win since he starts the game.
Let's first find the probability of getting 3 or more heads.
3 Heads - HHHTT, THHHT, TTHHH. We can get it in 3!/2! ways = 3 ways (because we have to arrange three elements T, T and HHH of which the two Ts are identical)
4 Heads - HHHHT, HHHTH, THHHH, HTHHH. We can get it in 4 ways because T has 4 distinct places in which it can be placed. It cannot be between two pairs of Hs each because 3 Heads need to be together.
5 Heads - HHHHH - We can get this in 1 way.
The total possible outcomes of 5 coin tosses are 2^5 = 32.
P(Three consecutive Heads) = (3 + 4 + 1)/32 = 1/4
Possibility of Ram winning = (1/4) + (3/4)*(3/4)*(1/4) + (3/4)^4*(1/4) + ...
Note how we get this:
(1/4) - Ram throw the die 5 times and gets 3 consecutive heads. Wins!
(3/4)*(3/4)*(1/4) - Ram throws the die 5 times but doesn't win. Shyam throws the die 5 times but doesn't win. Ram again throws and wins.
and so on...
This is an infinite GP.
Sum = (1/4) / (1 - 9/16) = 4/7
As per the question, this should be the answer.