In this paper we propose a hybrid method for solving inhomogeneous elliptic PDEs based on the unified transform. This approach relies on the derivation of the global relation, containing certain integral transforms of the given boundary data as well as of the unknown boundary values. Herewith, the approximate global relation for the Poisson equation is solved numerically using a collocation method on the complex λ-plane, based on Legendre expansions. The corresponding numerical results are presented using closed-form expressions and numerical approximations for different types of boundary and source data, indicating the applicability of the considered approach. Additionally, the full solution is computed in a recursive manner by splitting the domain into smaller concentric polygons, and by using a spatial-stepping scheme followed by an interpolation step. Furthermore, numerical results are also given for the solution of the Poisson and the inhomogeneous Helmholtz equations on several convex polygons. Additional results are provided for the case of nonconvex polygons as well as for the case of a problem with discontinuities across an interface. The proposed approach provides a framework for solving inhomogeneous elliptic PDEs using the unified transform.