Investigation of the splitting of quark and gluon jets