If developing for longer (within reason) makes your whites get darker, you are definitely not developing for long enough.(posted 9317 days ago)It is quite possible (but I can't be sure) that you are underdeveloping (giving grey blacks), and overexposing (giving grey whites) to compensate. Can you tell us how what your developer is, and long you develop for?
There are indeed other possible causes, such as unsafe 'safe' lights, flare in the enlarger, etc, but the first step is to get the development right.