Aldehyde and ketone reactions Reagents to carry out above conversion, P, Q, R respectively are:
(a) $\ce{H2C=CH-CH2-Br}$, $(\ce{HO-})$, $[\ce{HO-}, Δ]$, Wacker process.
(b) $\ce{H2C=CH-CH2-Br(HO^-)}$, Wacker process, $\ce{HO-}$, $Δ$.
(c) Wacker process, $\ce{H2C=CH-CH2-Br(HO^-)}$, $\ce{HO-} (Δ)$.
(d) Wacker process, $\ce{HO-} (Δ)$, $\ce{H2C=CH-CH2-Br(HO^-)}$.

Could someone please explain the R part of this reaction? I can't understand the five-membered cyclization step. Is it aldol condensation or there's something else?
Step P is std base-driven alpha alkylation of ketone. Step Q Wacker details here takes the terminal alkene to methyl ketone then step R is base-catalysed internal aldol mechanism here gives the product shown. So the answer is (b).