To find the ID of a task find the task in one of the task list views and click on the "Options" button. Then click on "Open Task":
Then the task will open in it's own page.
Look at the URL in your browsers address bar and you'll see the task ID after the text: /tasks/ - In the example below the task ID is: 33