Cannot get an image to resize

No matter what i do, i cannot get the image in the second div(with blue border) to resize. The goal is to get the width and height of the div to match the div with the green border but its not working. If i try something, the flex property no longer works and then the text is superimposed on the image. Getting frustrated. Any help would be appreciated.