Let
w----> width of the frame
we know that
[the total area (portrait plus frame)=(30+2w)*(40+2w)
2000=(30+2w)*(40+2w)
2000=1200+60w+80w+4w²
4w²+140w+1200-2000=0
4w²+140w-800=0
using a graph tool------> to resolve the second order equation
see the attached figure
the solution is
w=5 in
the answer is
w=5 in