how to solve laws of logic problems