You have to pay a separate entry fee for each of the two temples. Hagai Qim in the nearest one to the road and you can buy a ticket for both temples here which cost around 7E. they are still excavating much of the site and therefore there are areas which you cannot access.
Mnajdra is further down the cliff and there is about a 1 km walk downhill to the temples. This is the oldest of the two temples with parts dating back to 3600BC. This is a struggle if it is an extremely hot day as there is no shade whatsoever and you can easily get dehydrated.
There are some beautiful views over the ocean and towards the little nature reserve island. There is a little cafe which serves reasonable priced food and drinks in the car park, but this is the only place for miles so be prepared. Take plenty of water with you. It has a large covered seating area, as well as plenty of tables with umbrellas and a small inside dining area.
You can get the bus back to Valetta or attempt to walk down the hill to the blue grotto. This is a nice walk with some stunning views, and takes probably about 20 minutes at a good pace. But again, there is no shade, so have a good supply of water with you. You can then get the bus here back to Valetta. Be careful of the Taxi's as they will tell you buses very rarely come and try to charge you 20E to drive you to the next town - it only costs 0.48E to get to Valetta...don't be fooled by their helpfulness.