Washington Dulles International Airport: Rent a car at the airport and drive west via VA-7/I-81 and I-70/US-40: roughly 1 hour 45 minutes to 2 hours, traffic permitting. Expect about $50–100+ per day before fuel, taxes and insurance. There is no sensible all-public-transport transfer to Hancock.
Ronald Reagan Washington National Airport: A rental car is the practical option: about 2 to 2 hours 20 minutes via I-270 and I-70, depending heavily on Washington-area traffic. It is useful only if your flight is substantially better than Dulles; do not plan to connect by rail or bus.
Baltimore/Washington International Thurgood Marshall Airport: Rent a car and take I-70 west: around 2 hours to 2 hours 20 minutes. This is a straightforward drive but not a cheap or quick transit destination.
Martinsburg station, West Virginia: Amtrak’s Capitol Limited stops in Martinsburg, about 35–45 minutes by car from Hancock. It can work if someone is collecting you or you have a pre-arranged rental; do not assume an on-demand taxi or rideshare will be waiting.