Let L and S represent the amounts of the large and small pills respectively.
40L+30S≤600 is the total weight available (which could be a maximum value of 600mg).
Profit $P=2L+S, S≥2L, L≥3.
This can be solved graphically. If we plot the lines 40L+30S=600, S=2L, L=3. They enclose a triangular (feasible) region with vertices at (L,S)=(3,16), (6,12), (3,6).
(These intersection points (vertices) were found by solving pairs of equations making the lines. Substitute S=2L in 40L+30S=600 and we get 40L+60L=600, 100L=600, L=6 and S=12, the vertex is (6,12). Substitute L=3 in the same equation: 120+30S=600, 30S=480, S=16, the vertex (3,16). S=2L=6 when L=3, the vertex (3,6).)
Using these values for L and S in P=2L+S, we get respectively: $22, $24, $12, so the maximum profit of $24 is when there are 6 large pills and 12 small pills (240mg+360mg=600mg).
If the Simplex Method is used, it should produce the same result. In this case, the graphical method gives a better visual impression.