Let H=horsepower, A = angular speed in rotations per minute, r = radius, and K be the constant varialble that jointly varies the units together.
The formula for this joint variation problem would be
H= KAR^3
Plugging in the units and solving for the constant would be
40=K(120)(2)^3
40=K(120)(8)
40=960
1/24=K
Now using the fact that K = 1/24 plug in the know units and solve it again
H=(1/24)(80)(3)^3
H= (1/24)(80)(27)
H=90
Therefore it would take 90 Horsepower to safely transmit an 3 inch shaft rotating at 80 revolutions per min.