Complex sentence: At four she was composing and improvising piano, and by five had begun writing down her compositions.
Split into simpler sentences: At four she was composing and improvising piano. Aged five she began writing down her compositions.