Here is the solution:
for i from 1 to numSCCs:
dp[i] = compCoins[i]
for v in topoOrder:
for u in compAdj[v]:
dp[v] = max(dp[v], compCoins[v] + dp[u])
print max(dp[1..numSCCs])
Process in topological order to ensure dp[u] is computed before dp[v].
This runs in time and uses space.