Hanoi is the capital city and 3-4 days are enough in Hanoi. Just as most travellers we stayed in the Old quarter area near the old city gate for 1200 rs per night(breakfast included), you can also stay in hostels at much cheaper rate. Cafes, restaurants and markets are all in the vicinity and you can just walk and explore.I felt the restaurants in old quarter are slightly on the expensive side. You can buy sim cards and get all kinds of tours to Halong Bay from here. Best place to try Vietnamese coffee is in Hanoi. Also Hoan Kiem lake is just around old quarter so don't miss going there specially in the evening to get the vibe of the city. For a day we rented a bike from old quarter and visited main tourist spots which were a little further from where we stayed. We managed to cover Ho Chi Minh memorial , French quarters area , temple of literature etc. Check out details in my Hanoi video here. Also don't miss the weekend night market.