Number of slices of a peach pie = 12 slices.
Number of slices of a cherry pie = 8 slices.
Narendra and his friends ate 6/12 of the peach pie.
Let us assume x number of slices of the cherry pie they ate.
So, we can setup a proportion:

On cross multiplying, we get
12x = 8×6
12x = 48.
Dividing both sides by 12, we get
12x/12 = 48/12
x=4.
Therefore, they ate 4 slices of the cherry pie.