Every element is pushed onto stack only once, because in typical DFS implementation we check whether a vertex is visted or not befor calling dfs.
If dfs(8) is excuted once means vertex-8 is pushed once, then next time
visited=1. And condition evaluates to be false and dfs is not called on vertex 8.
And What will be answer for part-1 of question?