I'd do it all from the code, by adding a variable (property) to ExtendedProperties.
In case task is being created (CreateTask activity) and variable has not been defined yet:
In case task is being modified after task was created (e.g. using onTaskChanged) and:
- If variable has not been defined yet:
- If variable has previously been defined (e.g. during creation of the task):
AfterTaskProperties.ExtendedProperties["List_Item_URL"] = workfloProperties.Item.Url.toString();
As you understand, "List_Item_URL" is just example, you could add as many variables as needed this way. Not only with URL to listItem, but with any other data of listItem that taskItem might need to have in it.
After that it would be important to make sure task form displays those variables you added, the way you want. In case it is custom InfoPath form, you'd import it through ItemMetadata.xml with all fields listed as ows_fieldName and so on, but this is part of another story. Here is a good article on this: http://blogs.msdn.com/b/ncdevguy/archive/2009/10/31/infopath-retrieve-and-send-data-from-to-a-sharepoint-2007-workflow.aspx.