The two justices’ questioning foreshadows a likely divide between the court’s conservatives and liberals.