Let $(M,g)$ be a complete three dimensional Riemannian manifold with boundary $partial M$. Given smooth functions $K(x)>0$ and $c(x)$ defined on $M$ and $partial M$, respectively, it is natural to ask whether there exist metrics conformal to $g$ so that under these new metrics, $K$ is the scalar curvature and $c$ is the boundary mean curvature. All such metrics can be described by a prescribing curvature equation with a boundary condition. With suitable assumptions on $K$,$c$ and $(M,g)$ we show that all the solutions of the equation can only blow up at finite points over each compact subset of $bar M$, some of them may appear on $partial M$. We describe the asymptotic behavior of the blowup solutions around each blowup point and derive an energy estimate as a consequence.