If y varies directly as the square root of x and y = 3 when…