Answer
$L(d)=\frac{5d}{7}$
Work Step by Step
In the given image, we see two similar triangles. Similar triangles have the same ratios between corresponding sides, so we can write:
$L/5=(L+d)/12\\12L=5(L+d)\\7L=5d\\L=\frac{5d}{7}$
Thus, the length of the shadow $L$ as a function of distance from the lamp $d$ is modeled as:
$L(d)=\frac{5d}{7}$