The string has a force of tension of 10 N. The spring is stretched by an equal force of 5N in the opposite direction giving rise to a tension of 5+5=10N