One of the most critical aspects in the drilling operation is to reduce the nonproductive time and to avoid the borehole instability issues such as kicks, blow outs, lost circulation, stuck pipe, and breakouts. To investigate these problems, one has to understand the formation properties, fluid hydraulics, and the basic mechanics behind drilling a well. In the previous research on this field, the factors were widely discussed and results obtained were related to the formation properties. However, while considering the stresses in the wellbore, the mechanical factors such as the RPM and contact of casing at different positions in wellbore have usually been neglected. In furtherance to this study, the importance of thermal condition, fluid loss, and filter cake formation study cannot be out ruled. This work includes a new insight toward understanding the stress redistribution due to pipe contact by the wellbore and smear mechanism. Additionally, it presents the numerical analysis of influence of casing contact and downhole thermal conditions using the finite-element analysis. The classical equations used to obtain the wellbore stresses include very few parameters such as the far-field stresses, pore pressure, and wellbore geometry. They do not consider the influence of casing contact while drilling, mud-cake permeability, and elastic and inelastic properties of the formation. To take into account the effects of these parameters, finite-element analysis is carried out considering the above-mentioned parameters in various scenarios. The main objective of these simulations is to investigate the hypothesis of the increase in hoop stress considering casing contact with regard to formation stresses orientation. The study of different cases shows the variation of a few hundred psi of hoop stress. However, the thermal effect on the near-wellbore stress regions can be important for drilling in deep water and other complex drilling environments. To see the thermal effect, this study develops a thermo-poroelastic model. It is found that there is decrease in radial stress and hoop stress in near-wellbore region with time. This reduction will have a considerable impact on fracture initiation pressure in the near-wellbore region. Also, the smearing effect will be influenced by stress changes due to change in temperature.