this is implicit differentiation. We start by differentiating 3x^(2) to get 6x (lower the power by 1, multiply by the original power). For xy, we use the product rule, giving us y + (x)dy/dx (this is the implicit part). y^(2) is differentiated to 2y*dy/dx, and 12 on the RHS just becomes 0. We want to get dy/dx on its own so we first collect like terms on one side, factorise, and then divide. dy/dx(x+2y)=-6x-y, hence dy/dx=-(6x+y)/(x+2y)