@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 ?

x^2 - 6x + 25 = (x-3)^2 + 16
so min of sqrt (x^2-6x+25) = 4
y^2 - 8y + 25 = (y-4)^2 + 9
so min of sqrt (y^2-8y+25) will be 3
so min sum will be 7
for x=3 and y=4

Q30) There are 10 consecutive positive integers written on a blackboard. One number is erased. The sum of remaining nine integers is 2011. Which number was erased?