Typically, the best way is to make case distinctions on the most relevant variables, i.e., the variables that will reduce the remaining formula as much as possible. Usually, it is recommended to start with the variables that encode the current state, but it may also make sense to do that early for the next-state variables. The xor-operations are quite simple in this sense, since if you make a case distinction on p' or q' you will see that not much will be left.