Two trains leave a station at the same time on tracks that are 60° to each other. One train travels at 80 km/h and the other travels at 100 km/h. At what rate are the trains separating 2 hours later?
I tried cosine law implicit differentiation but the answer is not even close to making sense. I'm not sure where my error lies.

I think the intention of this exercise is to use related rates and - as mentioned in the header - implicit differentiation.
So, if $d(t)$ denotes the distance between the trains at time $t$ and if $v_1,v_2$ denote the two velocities, you have according to the law of cosines
$$d^2(t) = (v_1t)^2+ (v_2t)^2 - 2v_1v_2t^2\cos 60° = (v_1^2+v_2^2-v_1v_2)t^2$$
Implicit differentiation gives
$$2d(t)\dot d(t) = 2(v_1^2+v_2^2-v_1v_2)t$$
or $$\dot d(t) = \frac{(v_1^2+v_2^2-v_1v_2)t}{d(t)} = \frac{(v_1^2+v_2^2-v_1v_2)t}{t\sqrt{v_1^2+v_2^2-v_1v_2}} = \sqrt{v_1^2+v_2^2-v_1v_2}$$