In a DAG, longest path where every vertex has degree at most 2
First, remove all vertices whose degree is greater than 2 (i.e., their degree was greater than 2 in the original graph).  The result is a smaller DAG.  This can be done in linear time.

Now, find the longest path in the resulting DAG.  This can be done in linear time, too; see https://en.wikipedia.org/wiki/Longest_path_problem.