1) Board a Piccadilly line train to Heathrow Terminal 5 from Kings Cross St. Pancras.
2) Stay on the train until you reach Hammersmith.
The total journey time is approximately 30 minutes.