Ok, first of all, you need to find the cadence that suits you. Cadence is the rate at which your feet spin round. Everyone differs a bit as to what they find right, but you ideally want to have your feet spinning fairly freely, rather than pushing hard (ie grinding, left right left right). On the other hand, you don't want to be spinning so fast that you feel no resistance and you're rocking about on the saddle and wobbling. Somewhere between 80-100 revs per minute, if you want to try and count....
So, find what's right for you. Your 2 and 5 is probably about right for on the flat, but if your legs ache quickly, try running on 2 and 4. The reason to have gears os so that you can maintain your comfortable cadence - IE, keep your feet spinning at that nice rate, whether going up or down hills.
The following is what I tend to do. Other people may have different tactics, and it comes down to what suits you.
When you come to a slight upwards gradient, change down one on the right hand, so you're on 2 and 3. If it gets steeper, try 2 and 2. Basically, you want to try and keep your feet spinning round at about the same rate - the bike will slow down, but it's more comfortable for you. I find that I can do most of my riding in 2 and 4, with 2 and 3 for slight hills (and starting off), 2 and 2 for steeper hills and then I go for broke and change down the left hand to 1, so I'm on 1 and 2. At that point, I have one low gear left in the box, and I'm going so slowly I might as well get off and walk....
But I get up most things. Other people like to change down the left hand earlier. Find what suits you. If you can, change a little bit in advance, rather than wait until your feet start to slow down too much - it's just easier on your knees, and keeps your momentum going.
Down hill of course, you can change up - 2 and 4, 2 and 5, 3 and whatever - depending on how fast you are prepared to go. Alternatively, freewheel and enjoy the rest!
The main thing to remember is not to run the chain so that you are on 1 and 6, or 3 and 1 - this means that the chain is running at a sharp angle from front to back, which is inefficient, and bad for the chain, and probably noisy. Those individual ratios will be attainable with some other combination of gears anyway.
Have a look at the bike, and you'll see it. You have three rings at the pedal end, the biggest of these (on the outside) is the high gear, the smallest (inside) the low. At the back, on the wheel, you have 6 cogs, the biggest (inside) is the low gear, and the smallest (outside) the high. Running biggest to biggest or smallest to smallest is the no-no. From the middle ring at the front (your number 2 on the left hand), you can probably run from 1 to 6 on the right without too much problem.
Does that make sense? You can come at gears from a mathematical point of view, but in my experience, feeling what's right for you is the very best way, because everyone differs a bit.
Rattling in lower gears might mean your derailleur mech, front or rear, needs an adjustment. A good local bike shop will be able to help.