Answer
The length is $17$, the width is $18$
Work Step by Step
Let the width of the window be $x$, then the length of it is $x+1$, then our equation for the area is: $x(x+1)=306\\x^2+x=306\\x^2+x-306=0\\x^2-17x+18x-306=0\\x(x-17)+18(x-17)=0\\(x-17)(x+18)=0$
Thus $x=17$ or $x=-18$, but $x=-18$ doesn't make sense, thus the length is $17$, the width is $18$.