Interestingly, if you use Kruskal's algorithm instead, you don't even have to discard cables or worry about direction. When you come upon a duplicate cable, or even a cable that goes from a node to itself, the algorithm won't consider it because the cable does not span disjoint sets. Think about that.
Let's see how it works on example 4, which is the most complex. Here's the graph:
You can see that if you use Kruskal's algorithm, it will process the edges in increasing order of size. It will process edge (1,0) first and (1,3) second. At that point, there will be two connected components: {0, 1, 3} and {2}. There are two edges of weight 5, so suppose it processes edge (3,1). It will see that this edge does not connect different sets, so it will ignore the edge. The next edge, (2, 0) does connect different sets. At that point, there is just one set, so we're done. The total cable donation is the total of all of the edges, which is 146, minus the edges in the minimum spanning tree, which is 12. The answer is 134.