Step 1: Use the lens formula for convex lens.
The lens formula is given by:
\[
\frac{1}{f} = \frac{1}{v} - \frac{1}{u}
\]
Where:
- \( f \) is the focal length of the lens,
- \( v \) is the image distance (30 cm),
- \( u \) is the object distance (-15 cm, since the object is on the opposite side of the light sourc.
For the convex lens:
\[
\frac{1}{f_{\text{convex}}} = \frac{1}{30} - \frac{1}{(-15)}
\]
\[
\frac{1}{f_{\text{convex}}} = \frac{1}{30} + \frac{1}{15} = \frac{1}{10}
\]
So, \( f_{\text{convex}} = 10 \, \text{cm} \).
Step 2: Use the lens formula for concave lens.
When a concave lens is placed in contact with the convex lens, the total focal length of the system changes. The distance of the image shifts further by 30 cm. So the new image distance is 30 cm + 30 cm = 60 cm.
The total effective focal length \( f_{\text{total}} \) of two lenses in contact is given by:
\[
\frac{1}{f_{\text{total}}} = \frac{1}{f_{\text{convex}}} + \frac{1}{f_{\text{concave}}}
\]
Let the focal length of the concave lens be \( f_{\text{concave}} \).
For the new image distance:
\[
\frac{1}{f_{\text{total}}} = \frac{1}{60} \quad \text{and} \quad \frac{1}{f_{\text{convex}}} = \frac{1}{10}
\]
\[
\frac{1}{60} = \frac{1}{10} + \frac{1}{f_{\text{concave}}}
\]
\[
\frac{1}{f_{\text{concave}}} = \frac{1}{60} - \frac{1}{10} = \frac{1}{60} - \frac{6}{60} = -\frac{5}{60}
\]
Thus, \( f_{\text{concave}} = -12 \, \text{cm} \).
Final Answer:
The focal length of the convex lens is \( \boxed{10 \, \text{cm}} \), and the focal length of the concave lens is \( \boxed{-12 \, \text{cm}} \).