The capacity of condenser before inserting foil is C=Aϵ0d where A be the area of plate and d be the separation between plates.
After inserting foil the there will be two capacitors in series with capacitance 2C as distance is halved and the series combination of the two will give equivalent capacitance of C, hence, capacity will remain same.