Delays of 3-4 hrs are due 300 Euros, so definitely entitled to some compensation. I would file a claim with TAP stating the facts as you stated but very plainly. State you arrived at your FINAL destination x hours late due to delay on your TP flight. You will be getting some compensation, expect 300 but 600 would be a nice surprise. Also, UA should be giving ETC compensation if the subsequent delays are mechanical or operational.