Step 1 :First, we need to find the profit function. The profit, P(x, y), is given by the revenue, R(x, y), minus the cost, C(x, y). So, we have P(x, y) = R(x, y) - C(x, y) = 6x + 4y - (x^2 - 3xy + 6y^2 + 4x - 8y - 2) = -x^2 + 3xy - 6y^2 + 2x + 4y + 2.
Step 2 :Next, we need to find the critical points of P(x, y) by setting the partial derivatives equal to zero. The partial derivative of P with respect to x is \(\frac{\partial P}{\partial x} = -2x + 3y + 2\), and the partial derivative of P with respect to y is \(\frac{\partial P}{\partial y} = 3x - 12y + 4\). Setting these equal to zero gives us the system of equations: \(-2x + 3y + 2 = 0\) and \(3x - 12y + 4 = 0\).
Step 3 :Solving this system of equations, we get x = 2 and y = 1. So, the company should produce 2 thousand of type A solar panels and 1 thousand of type B solar panels per year to maximize profit.
Step 4 :Finally, we substitute x = 2 and y = 1 into the profit function to find the maximum profit. P(2, 1) = -2^2 + 3*2*1 - 6*1^2 + 2*2 + 4*1 + 2 = -4 + 6 - 6 + 4 + 4 + 2 = \(\boxed{6}\) million dollars.