As much as law helped luffy he also helped himself in taking down trebol. So both Law and Luffy got a blow on their opponents so it makes for a mutually beneficial move. In which case it acted more as a alliance than luffy being helped by lawNope, currently it's not even a solo fight since Law helped him.