I bought a used car 2010 nissan versa and when I go uphill it slows down alot. When going uphill it says go 60mph I am at that sp

I bought a used car 2010 nissan versa and when I go uphill it slows down alot. When going uphill it says go 60mph I am at that speed in the beginning then gradually it starts going 40mph in a 60mph area. I could get pulled over by the cops I am not good with cars and all what do u think is the problem?

My car has 119200 miles.
My car's transmission is unknown to me.

– I bought a used car 2010 nissan versa and when I go uphill it slows down alot. When going uphill it says go 60mph I am at that sp