We have written a few enrtries on teamwork and offside. Here is another example.
The video is unclear if the attacker was in an offside position at the moment of the last touch on the ball by his teammate. So the video does not have evidence to say that the goal was legal or not. However, for instructional purposes, pretend he was in an offside position when the ball was last touched by his teammate.
A good AR should be able to recognize that the ball, the attacker, and the GK were so close together that an offside offence (i.e. interfere with an opponent, or IWO) has happened. The referee in the middle is also expected to recognize that an offence has happened. If you are the referee, you would not know if the attacker was onside or offside. So you would just have the information that there was a possible IWO. Once your AR tells you the attacker was in an offside position, you would put two pieces of the puzzle together and disallow the goal. If the AR says the attacker was onside, you give the goal.
This is a great example of how important teamwork might be on a critical decision like this. Remember, we are only assuming the attacker was offside. We have no evidence from this video alone if the attacker was truly onside or offside. Therefore, this is not any commentary whatsoever on this referee crew.