http://prntscr.com/l1r36z
The other constraint is :
500x + 150y ≤ 5000
[ The number of television ads * their cost each + the number of online ads * their cost each cannot exceed $5000 ]