It's related to the video card.
Does either monitor work well when plugged to the VGA connector?
do you know what video card is in the computer?
My best guesses are either the video card can't support the monitors in the DVI interface (buy a new one) or the DVI cable is bad (check with a different cable).