Action of KMno4/H+ and heat in this reaction
The $\ce{LiAlH4}$ will reduce the cyclic anhydride to the diol. 

$\ce{KMnO4}$ re-oxidises both the alcohol groups (diol formed) to carboxylic acids and also oxidises the double bond to the diacid so the product you have drawn is correct, but it is an intermediate. You then have to consider the effect of heating this (to a pretty high temperature, I would assume).

Product A Heating causes a double dehydration to produce the di-anhydride shown but the right hand pair of acids do not recombine, instead the top acids combine and the bottom acids combine.

Product B Heating dehydrates the right hand diacid to the anhydride, the left hand diacid does a Claisen-ester-type thermal condensation followed by decarboxylation to give a ketone in  the left hand ring.