This 1990 photograph shows the Hubble Space Telescope being deployed from the space shuttle Discovery on mission STS-31.This 1990 photograph shows the Hubble Space Telescope being deployed from the space shuttle Discovery on mission STS-31.

If a private mission could extend the life of the Hubble telescope, it would be a win-win situation for everyone.

NASA signed an agreement with Musk's company and the Polaris Program to study the possibility of using a spaceship to dock with the telescope in an effort to further its lifetime.

Thomas Zurbuchen, NASA's science chief, said during a press call that the agency had been approached by the company.

Zurbuchen said thatHubble is doing great science.

The Hubble telescope is expected to be retired by the end of this decade, according to NASA. According to the agency, the spaceship has three gyros. The telescope could operate for another 15 to 20 years if it were moved closer to where it started.

Zurbuchen said it was appropriate for them to look at this because of the tremendous value this research asset has for them.

Zurbuchen said that the agreement between NASA and SpaceX does not involve a transfer of funds and that the company is funding their own participation.

The study will last six months and will look at how Crew Dragon could dock with the telescope and what modifications would need to be made.

The founder of Shift4 bought three more flights from Musk's company, dubbed Polaris, after flying on the first one.

The study doesn't guarantee a mission to Hubble, but it does fit within the parameters of the Polaris Program.

One of the greatest exploration assets of all time is Hubble.

NASA's Hubble has been in operation for more than 30 years and has aided in many discoveries. NASA flew five missions of astronauts out to repair and replace parts on the complex spacecraft using the agency's own Space Shuttle vehicles

The Polaris Dawn mission crew, from left: Medical officer Anna Menon, pilot Scott Poteet, commander Jared Isaacman, and mission specialist Sarah Gillis.

The crew of four will be in a Crew Dragon capsule for the first mission of Polaris Dawn. The third mission is expected to be the first crewed launch of the spaceship.

To reach the highest altitude around Earth that humans have ever flown, to conduct a spacewalk outside of the Dragon spaceship, and to use Starlink internet satellites are some of the objectives outlined by Isaacman.

CNBC recently joined the Polaris Dawn crew to see how fighter jets are used to prepare for the spaceflight, which is currently underway.

Polaris commander breaks down Dawn mission to attempt first-ever commercial spacewalk