Go step by step, considering the different possible outcomes, and then the probability of that happening.
A) It is possible that the first ball drawn, from urn A, is red. The probability of that is 4/10= 2/5. Once you move it to urn B, there will be 3 red, 6 green balls in A and 7 red balls, 3 green balls in B. Now
A1) You draw a red ball from B. The probability of that is 7/10. Moving that from B to A gets us again to 4 red, 6 green balls. The probability of drawing a gree ball from A is now 6/10= 3/5. The probability of all of these things happening is (2/5)(7/10)(3/5)
A2) You draw a green ball from B. The probability of that is 3/10. Moving that from B to A gets us to 3 red, 7 green balls. The probability of drawing a green ball is now 7/10. The probability of all those things happening is (2/5)(3/10)(7/10)
**************************************************************************************
B) It is possible that the first ball drawn, from urn A, is green. The probability of that is 6/10= 3/5. Once you move it to urn B, there will be 4 red, 5 green balls in A and 6 red balls 4 green balls in B. Now
You do "B1" and "B2".