Two spacewalking astronauts have tackled one of their toughest repairs to the Hubble Space Telescope.