What is the optimal training time for a combined weight training cardio workout and what is the optimal order it should be done in first weight or cardio?
The way you set up your programming is dependent on what is most important to you. If you want to be strong and conditioned, typically you perform your weight training first. If you want to be an endurance runner with some strength, you put your running first.
The periods of time that you apply to lifting vs. conditioning really depends on what you want to do. Personally, my lifting program takes me between 60-90 minutes to complete. On the shorter days I will tack on 20-30 minutes of conditioning.
You can draw your own conclusions, but I want to bring up some points that will contradict another answer to your question:
Bottom line is that the heavier the weights, the more potential that you can have problems due to fatigue. Now, if you learn how to fail properly you can lift in a fatigued state and when you fail you fail. However, the cost of not failing correctly goes up with the weight.
When you do both conditioning and lifting in the same day, you really do need to manage your recovery. Rest is important. On days when I have 60 minutes of conditioning followed by heavy lifting, I separate those sessions by at least 1.5 hours and get a meal in between. On those days where I tack 20-30 minutes of conditioning on to the end of the lifting, I keep the intensity up (heart rate) but allow enough rest between intervals so that my muscles don't become rubber. I've found that with a sufficient base of strength, conditioning after lifting with no more than a 5 minute rest in between is perfectly fine.
Again, prioritize your training by what is most important that day. If the conditioning is more important, do that first. If strength is more important, do that first. If you have a long session ahead of you for both, separate them by time and eat in between. You'll need the extra energy.
Optimal length of a workout is totally dependent on your goals and what type of training you are doing. Your exercises will determine the length of your workout.
If you are combining weight training and cardio into the same workout, it doesn't matter which you do first. If you are doing one workout and then the other you should run before you lift. If you lift before you run you put yourself at a higher risk of injury due to fatigued muscles and the plyometric explosiveness of running.
Update in response to another answer:
A few objections to the response you gave to my answer:
A) you should not (I repeat never : I really cannot stress this enough) be lifting heavy weights on your back if there is even the slightest chance you won't be able to control how the weights fall. always do lifts like squats in a rack with arms that will catch the weight if you have to drop it. So I repeat: you should never be in a situation that will cause you to injure your back when squatting.
B) If you don't have a spotter(which would be the only situation where you would have to lift 200 pounds off your chest by yourself in an emergency situation.) you don't put pins on the side of your barbell. This way if the weight has to come down, you take the weights off by bringing one arm down first.
C) Consider for a moment the difference between correct lifting precautions and the instability that is present when you are running. Weakened tendons around the knee can make it more difficult to control which way your knee bends. This is a given no matter what. Now consider that if your knee starts to give when lifting, you can just drop the weight (given proper lifting precautions) resulting in no injury. In comparison imagine your knee decides to give way when running. The most likely position for your knee to give way is in the explosive motion (remember running is a plyometric activity) that occurs when landing, loading and pushing off again. If your knee gives way at any point in this process, your full body weight, plus the energy that you created from forward momentum, will come down on your knee. It may happen that your knee folds correctly and you fall with little injury other than some scrapes and bruises, but more likely is that the weakened tendons around your knee give way and it collapses backwards, hyperextending your knee or worse, snapping your leg at the knee. and finally a side comment to B): When is your leg ever unloaded on the floor when running?
In contradiction to the bottom line of "Bottom line is that the heavier the weights, the more potential that you can have problems due to fatigue." Heavier weights don't cause more problems, they cause the same problems with higher consequences.
My experience is with division 1 volleyball at the collegiate level. I was squatting 525 pounds last year on my last set of 5 reps and to squat like that before a practice (3 hours of running and jumping) is a terrible idea.
I do however, agree wholeheartedly, that recovery time is important. It is perhaps even more important than the time that you spend lifting.