I am assuming that coin is replaced after being tossed.
m coins are fair and N-m coins are biased with head on one side.
So probability of picking one fair coin = m/N Probability of getting head in fair coin = (1/2)(m/N) Probability of getting tail in fair coin = (1/2)(m/N)
Probability of picking biased coin = 1 - m/N Probability of getting head in biased coin = (1 - m/N) Probability of getting tail in biased coin = 0
So net probability of getting head = (1/2)(m/N) + (1 - m/N) = 1 - m/2N and net probability of getting tail = m/2N
Question says that after 8 tosses he should be 2 steps away from the initial position.
This is possible for (5 heads + 3 tails) ; (3 heads + 5 tails).