Wait a minute the problem in the exercise is different from your OP. The problem ask for the torsional deflection in the entire length, 340", of the two shafts. So to calculate it, assume the junction between the 2" and 3" shaft to be stationary, then calculate the torsional deflection at that junction for the 2" shaft, 100 in long, exposed to a torsion of 2000 in-lb.; then calculate the torsional deflection of the 3", 240 in long, shaft exposed to a torsion of 4000 in-lb. Add the two torsional deflection values in order to meet the result ask for a torsional deflection of a 340" long member. Don't forget the 2" shaft is hollow.