I didn't read through all the replies to your question - they were all over the map, mostly correct - Depth of Field is the problem - so someone may have already given my 1-1/2 cents worth below.
A DOF problem can be easily resolved by using an online DOF calculator and table.
http://www.dofmaster.com/doftable.html. (This is one of many.)
Keeping it real simple and using the numbers that you listed, namely, Canon Ti3, aperture set at f/4.5 with a focal length on your lens set at 56 mm and shooting at a distance of 4 feet away from your subjects - neat kids, BTW - I used the above online depth of field calculator.
I plugged in the your 50 mm focal length, Canon Ti and "feet" for measurement, then hit the "calculate button" and perused the DOF table of shooting-distance on the left and f/stop on the top and came up with a DOF of about 4 inches. (You have to subtract the far point from the near point.)
This means that in your entire picture from where you were shooting, and as far as the eye could see, there was only one area that was IN-focus and that area was only 4-inches deep, thick, long or however you want to describe it. Everything else was either somewhat out of focus, like the kid in the background, or completely out of focus, like the far background itself.
Now assuming that both kids heads are about 7-inches in diameter and there was a little space (front to back) of about three inches between them, this adds up to be about 17-inches for the depth (front to back) of your subject.
But the calculator says that only 4 inches of that space will be in focus. The boy in front was in focus simply because that was where you were focusing. Had you had the focus squarely set on the boy to the rear, he would have been in focus and the boy in the foreground would been out of focus.
In order to solve this specific problem, i.e., to lengthen or increase the depth of field, you simply leave all the settings the same except the aperture. "Stop it down" to, say, f/8. The calculator computes the DOF for these settings to be a smidgeon over 2 feet. If you focus on either boy's face, you should get an image with both of them "in focus." But you will have to be "spot-on" as to where you place your focusing square. When shooting living things, I like to focus on their eyes... including race horses running around the track at the Kentucky Derby. (And no, I can't get you any tickets. :-)
There is no magic bullet or "rule of thumb," if you will, that you asked for. As you can see from the DOF calculator, the whole subject can get quite complex. Our eyes and brains - well some brains... mine drags sometimes :-) - do all of this calculating stuff automatically. Unfortunately, no one has invented a camera yet that meets the wonderfulness of an eye/brain combo.
That said, in the future when shooting close-ups of more than once person grouped together from such a short distance of 4-feet, before you hit the shutter button, do a simple pilots check-list to insure that your camera and lens are set at all of the following:
Mode: Av (Aperture Priority)
Aperture: f/8
Lens: 50 mm
ISO 200
Focus: Grid or whatever Canon calls its best focus)
Distance from you to subject: about 4 feet.
You can shoot all you want from 10 am to 2 pm with these settings and get really good images, provided that the subject in-focus. But it's a whole new ballgame if you decide to shoot at a greater distance than four feet and/or at different times of day.
I suggest as many others have: either go online or read a book and bone-up on DOF. There is slight learning curve, but the knowing the subject is necessary if you want to be able to take in-focus shots with good exposures... and to do the nice camera you have justice.