I hope you completed your exercise well. In case , you have not understood the concept well, I would recommend you a thorough revision of Day 1. If you have been able to solve the equations and have checked that your solutions are correct, then you may proceed.
If you get such questions in your objective exam or you need to solve them as a part of a bigger question then the method may be tedious. I shall derive a general formula for solving such equations for integral values which will prove to be beneficial. But ensure that in simple subjective questions you should not use this formula.