Unable to get the procedure

I know the approach, but unable to implement