Let me add a little food for thought to mtn's reply: where is your kid likely to fall academically, and what are you thinking in terms of college? Frequently, parents who are focused on the top school districts also tend to focus on the top colleges, so they choose the excellent, high-pressure schools to give their kids the best chance of getting into a top college/getting a scholarship. But one thing that I don't see addressed too often is the reality that those top colleges will generally only take a very few kids from even the best schools. E.g., Thomas Jefferson HS in Northern VA is one of the best math/science HS in the country -- but even they only get a few kids into the top schools. See e.g.
https://www.washingtonpost.com/local/education/tj-grads-headed-to-prestigious-colleges/2013/06/21/efe919a8-da82-11e2-9df4-895344c13c30_story.html?utm_term=.6a51ea47508c. So if your kid would be valedictorian at your local school but be in, say, the 30th percentile at TJ, which really gives them the better chance to get into that top school? And would your kid thrive in that kind of environment, or melt under the pressure? (I have one of each, FWIW)
Of course, it's not all about college admissions, either -- honestly, if my one kid could get an education like that, I'd be sending him to TJ, no questions asked. You also want your kid to be appropriately prepared for college (or whatever their future plans are), to be surrounded by good kids and in a well-managed school environment, to have an appropriate amount and level of schoolwork, etc. etc. etc. Also consider whether it would benefit your kid to have you home more to help them over bumps in the road or make sure homework gets done, etc. -- again, this is all about what your own particular kid needs.
When in doubt, visit both schools, talk to people whose kids go there, etc. Published rankings pretty much just tell you how wealthy or poor the area is, not how well or poorly the school does with the kids they get. Heck, my alma mater is apparently rated a "6" on at least one website, we had very little money, and yet I still managed to be a National Merit Scholar and get into several highly-selective schools -- go figure.