@nish95
If you use the equation ##\large \frac 1 v - \frac 1 u = \frac 1 f##, then you can get the correct sign for the object distance ##u## as follows:
If the object is on the same side of the lens as the side where the light
exits the lens, then ##u## is positive.
If the object is on the same side of the lens as the side where the light
enters the lens, then ##u## is negative.
Consider the convex lens in your system. The light travels from left to right through the lens. So, the light enters the lens on the left side and exits on the right side. The object is on the left side. So, the object is on the same side of the lens as the side where the light enters the lens. So, ##u## is negative. (##u = -30## cm for your problem.)
Consider the concave lens. The light still travels from left to right through this lens. However, the object of this lens is now on the right side of the lens. That is, the object is on the side of the lens where the light exits the lens. So, ##u## is positive for this case.
--------
Almost all textbooks that I've seen write the equation as ##\large \frac 1 v + \frac 1 u = \frac 1 f## with both terms on the left written with a positive sign. Then the sign convention for ##u## is opposite to the sign convention given above.