Most Auto Focus camera try to focus on the center of the picture (circled), in this case the background. But the subject of the picture is the two girls, so that is what the focus should be on.

To achieve this most Auto Focus cameras have a Focus Lock feature where you can point the camera at the subject (one of the girls) and lock the focus (usually by half depressing the shutter release) then moving the camera to correctly frame the picture before fully depressing the shutter release button to take the picture.