Only (副词,状语)when he saw that the man was actually telephoning the police(时间状语从句) did he(主语) realize(谓语) that they had all been the victims of a hoax(宾语从句).
时间状语从句中:
he (主语)saw(谓语) that the man was actually telephoning the police(宾语从句).
这是个倒装句,正序为
He(主语) realized(谓语) that they had all been the victims of a hoax(宾语从句)only when he saw that the man was actually telephoning the police(时间状语从句).