p = prob (overnight born = boy| Next day chosen = boy)
= prob (overnight born = boy AND Next day chosen = boy) / prob (Next day chosen = boy)
= .5 * 4/T / (.5*4/T + .5 * 3/T) = 2/3.5 = 4/7 ~ .57

@Vikrant-Garg
Probability of catching the bus = Probability of getting faulty machines in the first 2 tests (this part is clear right?)
This is possible in 2 ways - if we get DD or if we get GG as the result of first 2 tests.
In your doubt, if we get DG or GD we will require to do one more test, which would make the mechanic miss the bus. So DG and GD are not favourable cases.
So total number of ways = 4!/(2! x 2!) = 6 ways.
Favourable cases = 2
Probability = 2/6 = 1/3
Is it clear ?