To factor $ 2xy+6y+x+3 $ we can use factoring by grouping.
Group $ \color{blue}{ 2xy }$ with $ \color{blue}{ 6y }$ and $ \color{red}{ x }$ with $ \color{red}{ 3 }$ then factor each group.
$$ \begin{aligned} 2xy+6y+x+3 &= ( \color{blue}{ 2xy+6y } ) + ( \color{red}{ x+3 }) = \\ &= \color{blue}{ 2y( x+3 )} + \color{red}{ 1( x+3 ) } = \\ &= (2y+1)(x+3) \end{aligned} $$