In the button1 click handler the Task variable is local to the handler method. In order for you to be able to access said Task variable you'd have to declare it as a class field.
Task task1 = null;
private void button1_Click(object sender, EventArgs e)
{
task1 = Task.Factory.StartNew(needMuchTimeWork);
}
public void needMuchTimeWork()
{
}
private void button2_Click(object sender, EventArgs e)
{
if(task1 != null && !task1.IsPaused())
{
task1.Pause();
}
}