Like the millennials it wants to attract to work at its new headquarters, 23-year-old Amazon faces a tough choice: It can move into the city, with all of its vibrancy, cachet and access. Or it can move to a suburb, with all of the city's attributes just a short drive or train ride away and have a little more money to take advantage of it all. As the competition for Amazon's HQ2 project moves to a second phase, New York and New Jersey are battling tooth-and-nail to sway the company's decision. New York City and Newark, New Jersey, are on Amazon's shortlist of 20 potential locations for the $5 billion project, which Amazon says will ultimately employ 50,000 highly paid workers. In its request for proposals in September, Amazon said it wants a metropolitan area with a population of at least 1 million, a stable and business-friendly environment, a region with the ability to attract and retain top technical talent, and an area with a history of creative thinking in choosing locations. Both cities clearly pass the initial screening. They are huge population centers with highly developed transportation systems, including major international airports within the city limits. But most of the similarities end there.

Polishing the Big Apple

Two of the four sites New York has proposed are in the heart of the city. In Midtown West — a section of Manhattan anchored by Penn Station and Madison Square Garden, the city has offered Amazon a potential 26 million square feet of space in new and existing office buildings. In Lower Manhattan, according to the city's proposal, Amazon would have space for an 8.5-million-square-foot campus.

Amazon.com founder and CEO Jeff Bezos. Getty Images

Amazon could also join the influx of young professionals in Brooklyn, where the city is offering 15 million square feet in the borough's "Tech Triangle." Or it could join the more recent migration to Long Island City in Queens, with 13 million square feet of real estate in an area served by eight subway and rail lines. The proposal notes that New York is home not only to more Fortune 500 companies than any other city but also 9,000 start-ups and a burgeoning tech sector. "Companies don't just come to New York. They become part of New York, interconnected with our civic life, our institutions and our broader economy," wrote Mayor Bill de Blasio in a letter to Amazon Chairman Jeff Bezos last fall. "We want Amazon to be part of the New York story."

The case for Newark

Newark may lack some of the pizzazz of its neighbor across the Hudson River, but city and state officials have something else they hope will dazzle Amazon: lots of money. New Jersey is offering a package of $7 billion in state and local incentives, the largest offer of any of the 20 finalists, or at least those whose bids have been made public. Gov. Chris Christie signed the package into law shortly before leaving office in January. And while new Gov. Phil Murphy has yet to explicitly endorse the package, a source with knowledge of the governor's thinking says there are no plans to change the offer. According to New Jersey Sen. Cory Booker, the package of incentives to woo Amazon are worth it. "An Amazon win would be great for the city and the state, and get the world's attention. Newark is one of the best kept secrets in America with many competitive advantages. That's why it is growing and making great strides. It's transportation superstructure and tech talent pool from nearby universities are a draw for multinationals. You can hop on a train and get to New York City in 15 minutes." New Jersey Democratic Governor Phil Murphy said he is on board with the $7 billion in incentives package proposed by the administration of former Governor Chris Christie to lure Amazon. "We've been quite critical that under the Christie administration tax incentives were the only thing we reached for as a weapon to attract companies, and only for big companies, but I have to tell you, this is a once-in-a-lifetime opportunity," Governor Murphy said. Murphy rejected the argument that a $7 billion package for a company with $140 billion in revenue made little sense at a time when the state's middle class needs relief. "It's not an either/or," he said. "We need to deliver property tax relief and relief generally to the middle class that's been ravaged over the past eight years, and we will do that. ... But the prospect of a company that can create 50,000 jobs on their own and another 50,000 or more ancillary jobs in the economy ... those are opportunities that don't come along every day by a long shot." In contrast, New York Gov. Andrew Cuomo has not offered any details on what his state might offer. Mayor de Blasio has said the only city incentives would come from existing programs. Newark is a transportation hub in its own right, with an extensive rail network into Manhattan (an 18-minute train ride away), as well as up and down the Northeast Corridor. There is easy access to the Holland Tunnel and ferries to New York, and Newark Liberty International Airport is minutes away from downtown.

Like New York, Newark's proposed Amazon campus would have an urban feel. The city says it has 500,000 square feet of office space available for the company to move into immediately. Other sites available nearby include Bears and Eagles Riverfront Stadium — the former home of Newark's defunct Minor League baseball team — that is already slated to be torn down and replaced with a mixed-use development. Newark officials are quick to point out that all of this — plus housing for Amazon's employees — can be had for a fraction of the cost of real estate in Manhattan.

By the numbers and letters

Both cities' official bids leave out the region's drawbacks. They are considerable, according to a CNBC analysis using Amazon's criteria as measured for each location using data from our America's Top States for Business study and from the U.S. Census Bureau. We give New York a D overall. Newark is only slightly better, with a D+. Both New York and New Jersey have long histories of being difficult places to do business. New Jersey ranks No. 42 in our Top States Business Friendliness category, while New York is No. 45. New Jersey's state finances are among the worst in the nation, with bond ratings that are barely investment grade. New York is not doing much better, with at least $65 billion in unfunded pension obligations in the city alone. The state has a long history of lurching from one budget crisis to the next. As a result, both cities get failing grades on the criterion at the top of Amazon's list: a stable, business-friendly environment. Both cities have a wealth of higher-education institutions to draw from, and New York boasts that it has nearly twice as many technology workers as San Francisco. But other factors could hurt the cities' abilities to attract talent. We give New Jersey a D+ in the category, while New York gets an F. A heavy union presence hurts both states' Workforce rankings in our Top States study. Newark does not exactly have a reputation for the quality of life that tech talent might desire, while quality of life in New York City can be an acquired taste. As for Amazon's call for a place that offers creative thinking in choosing locations, both cities get failing grades. While both have the mass transit and airports Amazon want, and both have historically been generous with incentives and tax breaks, there is no getting around the fact that they are expensive places to do business, relative to the other locations Amazon is considering. Roads, bridges and subway systems are badly in need of repair, and commutes can be numbing.

Cross-purposes

But one of the biggest factors hindering both cities may be that they are working against each other, said Greg LeRoy, executive director of the non-partisan watchdog group Good Jobs First, who is closely watching the HQ2 sweepstakes. He believes New York and Newark would have been better off had they joined forces and bid together. "Anytime two big employment centers in the same labor market don't cooperate, it's a missed opportunity," LeRoy told CNBC. "If New York City and Newark had submitted a joint bid that had demonstrated a mastery of their respective strengths, it would have been a far stronger bid." Amazon has said it reserves the right to return to the bidders and seek different terms as the process continues, so conceivably the company could seek to combine locations that are near each other. But several cooperative bids failed to make the first cut in January. They included St. Louis, which included components across the Mississippi River in Illinois; transnational bids from Detroit and Windsor, Ontario; as well as El Paso, Texas, and Ciudad Juárez, Mexico.