$P\left (1+ \frac{r}{100} \right )^n$ is a standard formula for calculating compound amount for n years.
Here they asked for compound interest for $1\tfrac{1}{2}$ years so first, they calculate the amount for 1st year which is $\left (1+ \frac{r}{100} \right )$.
Now for the remaining half year, they apply Rate of interest for only for half year i.e for a whole year if Rate of interest is 4% then for half year Rate of interest is $(\frac{4}{2})$%=2% and apply formula $\left (1+ \frac{r/2}{100} \right )$.
So Amount = $P\left (1+ \frac{r}{100} \right )$$\left (1+ \frac{r/2}{100} \right )$.
Also, you can directly apply the formula Amount = $P\left (1+ \frac{r/2}{100} \right )^3$.
Here we calculate the Compound amount for a half year so hear for $1\tfrac{1}{2}$ we have a total 3 half years. Obviously, Rate of Interest is given in annum so for half yearly Rate of interest =$\tfrac{r}{2}$.