Small cell base stations deployment is a promising approach to offload traffic from macrocell, and improve the network capacity and coverage. However, interference management and providing seamless hand offs between access points (APs) for user equipments (UEs) remain main technical challenges especially in dense heterogeneous wireless networks. In this paper, a novel context-aware resource allocation (CARE) mechanism is proposed based on an adaptive space-time beamforming (ASTB) scheme, where different beam-widths (in time and space domains) are allocated to UEs according to their performance preferences with respect to delay tolerance, throughput, energy consumption and link robustness to the potential hand-off failure. We formulate CARE as a two-step matching game consisting of two many-to-one sub-matching games with externality for access and backhaul networks. We introduce two-step stable matching and Nash stability concepts as solutions of CARE. Our numerical results show that CARE with space-time beamforming provides at least two times higher capacity for UEs in comparison to space beamforming while the average delay and complexity are significantly decreased.