The length of the shadow for the shed would be 20 feets.
Creating a proportional expression : 
- height of tree = length of tree's shadow
- height of shed = length of shed's shadow
Now we have ; 
30 = 40
15 = d 
cross multiply 
30d = 40 × 15
d = 600/30
d = 20
The length of the shed's shadow would be 20 feets.