I recently got out of the Army on a medical discharge due to a back injury. Im able to run now and i want to get back in shape! What is recommendation to gain my muscle back and lose fat the fastest but also safely? Should i do cardio at least 30 minutes before a workout? And if so, what kind of cardio. How often should i work out?
Any recommendations I make will really hinge upon what sort of back injury you had. Was it trauma? Chronic? Pull or tear anything? Any remaining issues?
From your post, I think your overall goal is to gain some lost muscle back and keep your body fat as low as possible. The answer here depends on how many days per week you can train. At minimum I would recommend 3 weight training days per week, with 4 - 5 days being more ideal. How often will depend on how well your body recovers from each session.
Cardio (i.e. running) can be done on off days or on weight training days that are not leg dominant. Additionally, you might want to eschew the typical 30 minute steady state bout of running for a more interval-based method a few times a week. Something like 15 - 20 minutes of intervals would work well at keeping body fat levels in check as you gain mass.
I hope this info points you in the right direction.
Post back if you have any other questions.