To solve the problem in your link, what you really want to do is model income and expense.
To model expense, define the following variables
- $x_c$: the boxes of Zagnut bars bought from cosco
- $y_c$: the boxes of Zero bars bought from cosco
- $z_c$: the boxes of payday bars bought from cosco
- $x_w$: the boxes of Zagnut bars bought from Walmart
- $y_w$: the boxes of Zero bars bought from Walmart
- $z_w$: the boxes of payday bars bought from Walmart
Then, you have that your expenses are
$12.49x_c+9.89y_c+18.89z_c+9.05x_w+6.69y_w+4.45z_w \le 150$.
Then, you model your income:
$p_xn_x+p_yn_y+p_zn_z \ge 350$
where $p_x$ is the sales price for a Zagnut bar, and $n_x$ are the number of bars sold.
However, you don't know if you're going to sell out or not; furthermore, there is no information given as to whether your sales rates are affected by $p_w$.
If you assume you sell out, then $n_x = 24x_c+18x_w$, and so on.
I still don't see this as an optimization problem, however, as there appears to be nothing preventing you from pricing each bar at $1000 and calling it a day.
Community Wiki'd as this is just an extended comment.