write the law of resistance