Following pls find my worked solution:
T : P
4 : 7
T gave 2/3 of her cupcakes to P; thereby (1/3) of T's cupcakes remain.
T left: (1/3)x4u = (4/3)u
P left: 7u + [(2/3)x4u] = 7u + (8/3)u = (29/3)u
T : P
4 : 29
You can also derive the same answer using the standard Model method, in which you multiply the <Before> ratio / model by 3 times.
Then calculate the number of units given by T to P (i.e. (2/3) of 12u = 8u).
Hence, T would be left with (12u - 8u) = 4u ; while P would be increased to (21u + 8u) = 29u.
Ratio T : P (after) = 4 : 29
Do let me know again if there's further clarification.