Text this: Compatibility of muon g − 2, W mass anomaly in type-X 2HDM