In order to get p on its own, it is necessary to move it over to the right hand side of the equation. When moving something from one side to another, you flip the sign. For example, in this case, it is 8*p, but when moved over to the other side, it is 24/8. Therefore, p=3