Compute tin[v] and tout[v] via DFS.
Build array where arr[tin[v]] = +value[v] and arr[tout[v]] = -value[v].
Use BIT or segment tree for prefix sums with point updates.
For path sum query to : query prefix sum from to tin[v].
For value update on : update arr[tin[v]] and arr[tout[v]] with the delta. Each query is .
Space complexity is for the data structures used.