Stackelberg problem? Suppose that two firms have different production costs: Player I's cost of producing x is x+2, while Player II's cost to produce y is 3y+1. Suppose that the price function is p(x,y)=17−x−y, where x and y are the amounts produced by I and II respectively. Use the Stackelberg model, so that Player I must set his production level first. What is the equilibrium? 
I'm not sure how the different costs are implemented in the usual equations for Stackelberg models. I figured that:
P= 17-x-y would lead to u=y*(17-x-y)-(3y+1)*y 
But after I solve for y I'm not sure how this is used in the equation for x
 A: Player 1's profit is $p(x,y)x-c(x)$. That is, the price he can charge if player 2 produces $y$ and he produces $x$ times the amount of $x$ he produces (this is revenue) minus the cost of producing $x$. You can define player 2s problem similarly. 
Since player 2 move second, lets consider her subgame after player 1 has chosen to produce $x$. She solves
$$\max_y (17-x-y)y - (3y+1)$$
This has FOC
$$17-x-2y-3=0$$
So $y=\frac{14-x}{2}$. 
Player 1 anticipates this and solves
$$\max_x (17-x-\frac{14-x}{2})x-(x+2).$$
The FOC is 
$$17-x-7-1=0$$
So $x=9$. Player 2 plays $y(x)=\max(\frac{14-x}{2},0)$, which on the equilibrium path is $\frac{5}{2}$. 
I'm assuming the costs you've written down are total costs (that is, $x+2$ is the amount it costs to produce $x$ units of the good). If they were instead marginal costs, then $c(x)$ in the following expression should be $\int_0^x s+2 ds$ (and $c(y)$ would be defined similarly).
I'm also assuming production costs follow the same formula at $0$, if they didn't, and the cost of producing 0 was 0, then player 2s strategy would become $\frac{14-x}{2}$ as long as profits were positive and 0 otherwise (in this case, firm 2 shouldn't produce when to $x>12$). Its easy to verify that player 1s profits would be decreasing if they set $x>12$, and are less than the profit they make at $x=9$ at $12$, so this is not optimal.
