The resolution of The BFG is found in the final three chapters: "The Plan," "Feeding Time," and "The Author." After Sophie and the BFG convince the Queen of England that giants really are gobbling up children from all over the world each night, they hatch a plan together to capture the giants so they can no longer terrorize the Earth. They tie the giants up and carry them back to England using helicopters. When they get there, they drop them in a pit 500 feet deep—so deep that even if all the giants stand on each other's shoulders they cannot get out. Instead of people, they are now forced to eat snozzcumbers, the disgusting vegetable from giant country. Thousands of tourists come to look at the giants, deep in their hole where they cannot harm anyone.
As for Sophie and the BFG, the leaders of all the world's countries are so grateful that they send them presents and thank yous: elephants, camels, llamas, boots, hats, sweet and sour pork, and pullovers. The Queen of England ordered that two houses should be built—a big one for the BFG and a little one for Sophie—and they lived happily side-by-side for many years. The BFG was made England's official Dream-Blower, and he traveled the country giving good dreams to sleeping children.
In short, everything ends well and everyone is happy except for the bad giants, but they deserve everything they got.