There are a couple things to note here.
First, I assume you are speaking of a fast food restaurant, or similar type of business where there is a "parent" brand/company, but many (if not all) of the locations are owned by franchisees. For instance, McDonalds. Almost every McDonalds restaurant out there is owned by a franchisee, not McDonalds Corporation. These franchisees are their own entity and they license the name/food products/characters from the parent in exchange for a royalty fee and other fees. These companies can have any name they want, but for this example, lets use McDonalds Corp as the parent, McDonalds Franchisee 1 as an owner of 10 restaurants, and McDonalds Franchisee 2 as an owner of 20 restaurants.
Second, it really depends on the exact language of your non-compete agreement. If your agreement was with a specific franchisee, then you cannot compete with that company. For instance, if you work for a McDonalds franchise owned by McDonalds Franchisee 1, and it is located in Anywhere, California, then you cannot compete with any other restaurant owned by McDonalds Franchisee 1. You can, however, most likely compete with a McDonalds owned by McDonalds Franchisee 2.
You also must read your non-compete to see if it specifies a geographic area to define the word "compete". It is unrealistic to expect you to not open a restaurant in Maryland if the franchisee you worked for only operates in California. Your non compete probably have a geographic area (such as within 50 miles, within the same county, etc). If you open your restaurant outside of this area, you are fine and not considered "in competition".
The hardest part of non-compete agreements is to determine what is a reasonable geographic area. For a fast food type restaurant, the geographic area is going to be rather small (maybe 10 miles, most likely a lot less) because there is a McDonalds about every mile in some cities.
In your case, it appears you are asking if you can open a franchise in a different town. You don't say whether it is a franchise of the same brand, or just the same industry. You need to review your non compete to determine if it is limited to the same brand, or to the same industry. You also need to review it to see if it defines the geographic area that is to be protected against competition. If Town B is outside that area, you are fine.
If none of that helps, I would highly recommend consulting an attorney on the matter. Most attorneys will review the document in an initial consultation with you a no charge. Even if they do charge, it will be a minimal cost versus getting sued for breaking your agreement.