A police officer crashed his car into another police vehicle in “a practical joke that went wrong”, a hearing was told.