Let E1 and E2 respectively denote the events that a red ball is transferred from bag I to II and a black ball is transferred from bag I to II.
P(E1)=37 and P(E2)=47
Let A be the event that the ball drawn is red.
When a red ball is transferred from bag I to II,
P(A|E1)=510=12
When a black ball is transferred from bag I to II,
P(A|E2)=410=25
∴P(E2|A)=P(E2)P(A|E2)P(E1)P(A|E1)+P(E2)P(A|E2)
=47×2537×12+47×25
=1631=0.51