IoT in healthcare is revolutionizing the industry by providing real-time monitoring, remote patient care, and improved diagnosis and treatment options. Healthcare applications are latency sensitive and have major issues such as real-time response delay, latency and bandwidth overuse. In emergency scenarios, patient status control and monitoring directly impact lives. This research work proposes a novel technique: Rigorous execution of healthcare APplication using grey wolf-Improved african buffalo optimization-based offloading Decision (RAPID) algorithm to reduce the latency in fog environment. The RAPID approach generates the immediate response and forwards it to the caretakers by performing an offloading decision using the proposed Fog manager and a novel hybrid Grey Wolf-Improved African Buffalo Optimization (GW-IABO) algorithm with Intelligent Sampling technique and 5G communication. The proposed algorithm, Grey wolf optimization (GWO), evaluates the fitness of the solution, and Improved African Buffalo (IABO) explores and exploits the solutions by enhancing inertia to find the best solution in the optimal area. Intelligent sampling finds the optimal area to search for optimal solution. The RAPID approach employs Intelligent Sampling to reduce response time significantly and hence improve the efficiency of the proposed hybrid GW-IABO algorithm. Thus, the proposed hybrid algorithm effectively offloads to reduce the response time.