In this article we employ the nuclear EMC effect to extract the parton distribution functions (PDFs) inside the Lead (Pb) and Gold (Au) nuclei. Extracted PDFs are utilized to obtain the transverse momentum dependent (TMD) ones, using the computing codes like Pythia 8 or MCFM-10. Through this procedure TMDPDFs for charm and bottom quarks in Au at $\sqrt{s_{NN}}=200\;GeV$, Pb at $\sqrt{s_{NN}}=2.76\;TeV$ and $\sqrt{s_{NN}}=5.02\;TeV$ are calculated. To evaluate the validity of results and investigate the influence of nuclear EMC effect, the numerated TMDs are used as input to estimate heavy quark modification factor $R_{AA}$ at transverse plane $P_T$. This observable is calculated through numerical solution of the Fokker-Planck equation. For this purpose we need to extract the drag and diffusion coefficients, using the hard thermal loop correction. It is done in the frame work of the relativistic hydrodynamics up to the third order approximation of gradient expansion. The results are compared with same solutions when the input PFDs are considered inside the unbounded protons where the nuclear effect is not included. The comparison indicates a significant improvement of computed $R_{AA}$ with available experimental data when the EMC effect is considered.