Problems of division and prime

apart from by choosing number method, How can i solve it?