Good for you for getting out there
If your chest hurt you probably need to back off. Consider a trip to your doctor. Chest pain should not be taken lightly
I think you need to work on fitness. It might be wise to build up to these hills.
maybe gear down and spin? Find a different route?
You are breathing hard because your body wants more oxygen to fuel your exercise. You are pushing to your limit. Your legs are tired because of the workload
As your fitness improves your breathing will become less desperate for the same workload the legs will be less tired
As you get in better shape if you push to your limit you will feel the same shortness of breath and tiredness in the legs. You will recover quicker however and be able to go farther and faster. Your chest should not hurt.
Good luck and keep at it