Yes, you can exit the airport freely. You will clear Indian immigration & customs at Delhi, after which you can choose to stay in the terminal (both your arriving and departing flights are to/from Terminal 3) or continue anywhere else in Delhi.
Can I stay 1-2 weeks after my visa expires?
No, you can’t:
Regardless of the duration of the valid visa, the maximum duration of stay in India is limited to 6 months (180 days) on each visit. Extension of stay is not granted on tourist visas and it can not be converted into any other visa.
If so, be prepared to pay the equivalent of US $30>