Hi,
In order to create a Validation Rule (VR) on the Task Level (select a task from the left pane) to do so you need to generate a criteria (which is comprised of 1 or more condition) that will result TRUE.
In that case it would be the following conditions:
1. isChanged($State) - which means that a user (or another business) tried to changed the state of the Work item (or in your case a task).
2. $State<>'Active' - the state is other than Active.
3. $PendingTimeTrackingEffort>Hours(0) - there is more than 0 hours pending.
You will need to join all the condition into one evaluation criteria using the && (AND) operator.
Eventually the criteria would be: isChanged($State) && $State<>'Active' && $PendingTimeTrackingEffort>Hours(0)
Good luck!
Tamir