On a New Hilbert Type Inequality and its Applications