$${\textbf{Step -1: Taking the events and framing an
equation}}{\text{.}}$$
$${\text{Let }}{E_1}{\text{
be an event of drawing a red ball and placing a green ball in the bag}}$$
$${E_2}{\text{ be the event
of drawing a gree nball and placing a red ball in the bag}}$$
$${\text{and }}E{\text{ be
the event of drawing a red ball in second draw}}{\text{.}}$$
$${\text{So we can write,}}$$
$$P(E) = P\left( {{E_1}}
\right) \times P\left( {\dfrac{E}{{{E_1}}}} \right) + P\left( {{E_2}} \right)
\times P\left( {\dfrac{{E}}{{{E_2}}}} \right)$$
$${\textbf{Step -2: Calculating the required probability}}{\text{.}}$$
$$P\left( {{E_1}}
\right)P\left( {\dfrac{E}{{{E_1}}}} \right) = {\text{drawing a red ball on the
second draw when in the first draw we took }}$$
$${\text{a red ball and
placed a green one }}$$
$$P\left( {{E_1}}
\right)P\left( {\dfrac{E}{{{E_1}}}} \right) = \dfrac{5}{7} \times \dfrac{4}{7}$$$${\textbf{ (As
earlier there were 5 red balls out of total 7 }}$$
$${\textbf{and then we drew a
red and placed a green so now there are 4 red balls out of 7}}{\text{.)}}$$
$$P\left( {{E_2}}
\right)P\left( {\dfrac{E}{{{E_2}}}} \right) = {\text{drawing a red ball on the
second draw when in the first draw we took }}$$
$${\text{a green ball and
placed a red one }}$$
$$P\left( {{E_2}} \right)
\times P\left( {\dfrac{{E}}{{{E_2}}}} \right) = {\text{ }}\dfrac{2}{7} \times \dfrac{6}{7}$$$$\;\;({\textbf{As
there were 2 green balls out of 7 and then we put a red ball }}{\text{.}}$$
$${\textbf{So now we have to
draw a red ball and there are 6 reds out of 7}}{\text{.}})$$
$$P(E) = \dfrac{5}{7} \times
\dfrac{4}{7} + \dfrac{2}{7} \times \dfrac{6}{7} = \dfrac{{20 + 12}}{{49}} = \dfrac{{32}}{{49}}$$
$${\textbf{Hence, the total probability is }}\dfrac{{32}}{{49}}.$$