We are given an DAG G=(V, E) and two vertices $s, t \in V$ and a set $W \subset V$ where $|W| = k$ and $s, t \notin W$. A path is valid, if and only if all vertices in $W$ are on the path. I have to show, that if there are two valid paths $P_1, P_2$ they have the same sequence of vertices.
My intuition was, that if the sequence is different it implies a cycle in $W$ (since the vertices that differ in the sequence have to be connected) and therefore a cycle in $V$ which would be a contradiction to the definition.
I tried to formulate a proper proof by contradiction but I'm stuck since I can't find a way to formulate a general case. I'm a CS student and new to graph theory.
You're on the right track.
Hint: Assume that $P_1$ and $P_2$ are different paths relative to $W$.. Then there must be vertices $u,v\in W$ such that $u$ comes before $v$ in $P_1$ and $v$ comes before $u$ in $P_2$. From that, you can build a directed cycle in $G$ and thus derive a contradiction.