Solution:
We will prove that if m≥n−4, then there is guaranteed to be a smaller polygon with 3 or 4 sides, while if m≤n−5, there might not be a polygon with 3 or 4 sides. This will solve both parts of the problem.
Given a configuration of lines, let P1,…,Pk be all of the resulting smaller polygons. Let E(Pi) be the number of edges in polygon Pi, and let E=E(P1)+⋯+E(Pk). First, note that whenever a new polygon is formed, it must have been because a larger polygon was split into two smaller polygons by a line passing through it. When this happens, k increases by 1 and E increases by at most 4 (it might be less than 4 if the line passes through vertices of the larger polygon). Therefore, if adding an acceptable line increases the number of polygons by a, then E increases by at most 4a.
Now, assume m≥n−4. At the beginning, we have k=1 and E=n. If the number of polygons at the end is p+1, then E≤n+4p, so the average number of edges per polygon is less than or equal to 1+pn+4p. Now, note that each acceptable line introduces at least one new polygon, so p≥m≥n−4. Also, note that as p increases, 1+pn+4p strictly decreases, so it is maximized at p=n−4, where 1+pn+4p=n−35n−16=5−n−31<5. Therefore, the average number of edges per polygon is less than 5, so there must exist a polygon with either 3 or 4 edges, as desired.
We will now show that if m≤n−5, then we can draw m acceptable lines in a regular n-gon A1A2…An such that there are no polygons with 3 or 4 sides. Let M1 be the midpoint of A3A4, M2 be the midpoint of A4A5, …, Mn−5 be the midpoint of An−3An−4. Let the m acceptable lines be A1M1,A1M2,…,A1Mm. We can see that all resulting polygons have 5 sides or more, so we are done.