Thanks, it is grayed out though.
BTW, I want to speed up a few seconds of a 20 second animation.
You have to select the layer in the timeline to which you want to apply Time Remapping.
Time remapping works on footage and nested compositions or pre-composed layers. It does not work directly on animated layers.
I take it from your description that you want to alter the time of a composition. If so just drag your composition into the New Composition icon at the bottom of the Project window, then open up the composition settings (CTRL/Cmnd + K) and add a bit of time to the comp, then select the layer and press Ctrl/Alt + Option/Cmnd + T or use Layer>Time>Enable Time Remapping from the menu.