Two men have been charged and will appear in court after a pedestrian was struck by a car in County Durham.