The problem is essentially asking us to find [tex]d[/tex] when [tex]c = 240[/tex]. To do this, let's use 240 for [tex]c[/tex] and solve for [tex]d[/tex].
[tex]240 = 40 + 20d[/tex]
[tex]200 = 20d[/tex]
[tex]d = 10[/tex]
You would be renting it for 10 days.