Let Ф = 45 deg be the angle between two plane mirrors. Draw the bisector line between the two plane mirrors.
Take an object at a distance x. Construct the images by drawing perpendiculars to the mirrors from the object and going equal distance behind the mirrors. You get I1 and I5. Draw the image I2 of I1 in Mirror2. Draw image I6 of I5 in mirror 1. Similarly the images I3 and I7 of I2 and I6 in the mirrors respectively.
I7 and I3 will have the same image I4, which is on the middle line between the mirrors. Images of I4 will be I7 and I3 again. So there are no more images.
If you observe and use geometry, you find that the images and the object form a regular polygon of 8 sides. The vertices are the object and the images.
The point of intersection of the two plane mirrors is the center O of polygon. The angle 2π around O is divided into 2π/Ф number of parts. So the number of vertices is equal to 2π/Ф. One of the vertices is the object itself.
Hence the number of images = 2π / Ф - 1
For Ф = 45 deg = π/4 , Number of images = 2π / (π/4) - 1 = 8 - 1 = 7