we can factorize it through factor the common factor
for example there is a polynomial 3x^2+x+6y^2+2y
we can have a simple grouping first , put x in a group and y in another
(3x^2+x) (+6y^2+2y)
by extracting the common factor ,
we can see x(3x+1)+2y(3y+1)
as both x(3x+1) and 2y(3y+1) have the same factor(3y+1) still
we need to factorize it also and it will become (x+2y)(3y+1)
factorization is done!
there is another way also
please see https://www.khanacademy.org/math/algebra/multiplying-factoring-expression/factoring-quadratics-in-two-vari/e/factoring_polynomials_with_two_variables for more about factorizing this kind of polynomial
hope this can help you