Complex sentence: He played two years until 2009 when his contract ended, being signed by Real Madrid Castilla.
Split into simpler sentences: He played two years until 2009 when his contract ended. Then he was signed by Real Madrid Castilla.