Economic problem based on constraint of scarce product

Hi, so i'm trying to figure out how to do this question but I'm a bit lost.

I assume the answer to a) is 3P1 + P2 = K

after that, I'm not sure what to do.

Any help is greatly appreciated! Thanks in advance!!

p.s I'm not trying to make anyone do this for me, just a point in the right direction would be nice :)

Consider a two product firm with a profit function:

where q1 and q2 are the output levels of products 1 and 2 respectively. The

manufacturing of the two products uses a scarce resource: one unit of product 1 uses 3 units of the resource and one unit of product 2 uses one unit of the resource. The firm has K units of this scarce resource.

a) Write down the firm's constraint that involves the use of this scarce product.

b) Assume the constraint is binding, i.e., that K is sufficiently small that all

of the scarce resource will be used. Solve the constrained maximization

problem of the rm using the substitution method.

c) What is the profit of the firm at the optimal values of q1 and q2?

Hint: the answer will be a function of K.

d) What is the marginal value of the scarce resource to the firm (in terms of

increased profit)?

e) For what value of K would the resource no longer be scarce? , i.e., how high

must K be for the firm to choose not to use all of this resource?