If you work in Maryland and are a resident of the District of Columbia, Pennsylvania, Virginia, or West Virginia, submit exemption Form MW 507 to your employer. Then he will not withhold MD tax.
Although many employers will withhold VA tax for you, your MD employer is not required to do so. If you want to avoid an underpayment penalty for VA income tax, you will have to submit quarterly tax payments to VA.
TurboTax (TT) can prepare the quarterly payment vouchers. In your 2018 software, enter at:
Federal Taxes or Personal (H&B version)
-Other Tax Situations
-Other Tax Forms
-Form W-4 and Estimated Taxes - Click the Start or Update button
On the next screen answer No to the W-4 question
If your goal is just to avoid the underpayment penalty, then paying 100% of the prior year tax liability is the “safe haven”
You can make payments online, instead. See https://www.tax.virginia.gov/individual-estimated-tax-payments