import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(0, 30, 100)
y1 = 30 - x
y2 = (100 - 4*x) / 3

fig, ax = plt.subplots(figsize=(8, 6))
ax.plot(x, y1, 'b-', linewidth=2, label='x + y = 30')
ax.plot(x, y2, 'r-', linewidth=2, label='4x + 3y = 100')

ax.plot(10, 20, 'go', markersize=12, label='Solution (10, 20)')
ax.annotate('Tables=10, Chairs=20', xy=(10, 20), xytext=(15, 25),
            arrowprops=dict(arrowstyle='->', color='green'),
            fontsize=12, color='green')

ax.set_xlabel('Tables (x)', fontsize=12)
ax.set_ylabel('Chairs (y)', fontsize=12)
ax.set_title('Problem 2: Graphical Solution', fontsize=14)
ax.legend(loc='upper right')
ax.grid(True, alpha=0.3)
ax.set_xlim(0, 30)
ax.set_ylim(0, 30)

plt.tight_layout()
plt.show()