You need to get silver before getting gold.
And however you get to silver first counts.
What I mean to say is, if you collect more than 24k miles before flying on A3/OA twice, 24k miles will count towards silver and only the access will get you towards gold.
So (generally), the following things can get you to gold:
1. Silver (12k + 2 segments) and then gold (24k + 4 segments)
2. Silver (24k) and then gold (24k + 4 segments)
3. Silver (12k + 2 segments) and then gold (48k)
4. Silver (24k) and then gold (48k)
But Silver MUST be completed first.
Applied to your case, if you fly 38k miles on TK before ever flying on A3/OA, only 14k miles will count towards gold.
No matter how many times you'll fly A3/OA after that, the first 24k will get you to silver. Period.
An alternative would be, flying 2 segments on A3/OA, then flying the 38k on TK.
Then 12k (actually less since the A3/OA flights will also earn sth but for simplicity...) of the TK flights plus the 2 segments on A3/OA will get you silver.
The remaining 26k will then count towards gold, requiring you to either fly another 22k miles or 4 segments on A3/OA.
Segments flown before being upgraded to gold do not carry over if I recall correctly.
Hope this helps.