If you've been on a long hiatus from the gym it might be wise to get a checkup with your doctor first before you get started again.
Generally, I recommend a crawl, walk, run approach to exercise. In other words, start off small and work your way up. Doing 30 minutes on the elliptical sounds reasonable for a beginner. But, depending on your fitness level, running on the treadmill may be too aggressive. Why not jog or walk on an incline to start?
The right amount and type of cardio exercise depends on the person. Shoot for a cardio workout that is strenuous enough that you can talk, but not sing. Someone who has previous exercise experience will have muscle memory and can likely progress to more intense exercises at a faster rate. Being younger should also help you progress more quickly.
You'll also need to include some strength and flexibility training for a more comprehensive routine. Again, the right amount and type of exercises really can vary depending on the individual. But shooting to do strength and flexibility workouts two to three times a week would be a good start. The main thing to remember regarding both strength and flexibility work is to maintain proper form to avoid injury...slow and steady wins the race.
Here's a short but effective session for you
Take 30s rest in between each exercise
A1. Goblet squat 8-12 reps
A2. Push ups (on knees and hands on bench will make it easier) 8-12
A3.Hip Lifts 8-12
A4. Seated Cable row with a 2 sec pause (pause when elbows are back)
rest a full 60s after A4 and then repeat 2-3 more times. That will get you started
Also as Xin-min said hiring a trainer is a great investment as they'll be able to show you the right technique etc.
Also, things like hiking or other outdoor activities can be a great energy/exercise boost that can be the change of pace you need to keep you going strong.