It looks unidiomatic to write it like this :
(1) We will see that these two tasks have a lot in common, and in particular both can be viewed as a task in function approximation.
What you have given is good , though not the intended meaning in the Context here [[ thanks to user "Mari-Lou A" for including that ]] :
(2) We will see that these two tasks have a lot in common, and in particular both can be viewed as tasks in function approximation.
Slightly better (though still not the intended meaning) is to drop the "and" & then use "Both" to start a new Sentence :
(3) We will see that these two tasks have a lot in common [:;.] {use Colon or Semicolon or Period here} Both can be viewed as tasks in function approximation.
Even better is this (which is still not the intended meaning) :
(4) We will see that these two tasks have a lot in common, and in particular these two can be viewed as tasks in function approximation.
The meaning is : "task1 is a task in function approximation" & "task2 is a task in function approximation" , in general.
Alternate Context can occur [[ Indeed , that is the Case here ! ]] , where we have to write it like this :
(5) We will see that these two tasks have a lot in common, and in particular these two can be viewed as a single task in function approximation.
The meaning is : "task1 & task2 generally occur together to become a larger task3 which is a single inseparable generalized task in function approximation" , in general.
Example in general : "Identify (x,y) values where y is maximum" is made of 2 tasks : "Identify x" & "Identify y" : Yet , it can be a single inseparable task.
Example in Context : Classification is a technique which converts Input values to Output label , while regression is a technique which converts Input values to Output value. These two tasks can be generalized into a Single task to convert Input numbers into Output function.
[[ Speaking loosely ! This is not a question concerning the technology involved !! ]]