This paper investigates the joint power control and spectrum sharing problem for vehicle-to-everything (V2X) communications based on long term evolution unlicensed (LTE-U) technology in a heterogeneous network environment. We classify vehicle user equipments (VUEs) into safety and non-safety VUEs according to their respective service and access categories. To address the joint problem of spectrum allocation, power control, and spectrum sharing, a resource allocation strategy is proposed to guarantee fair coexistence among users. Each periodic access interval over unlicensed spectrum is divided into content period (CP) duration and content free period (CFP) duration. Accordingly, this paper proposes a framework which allows non-safety VUEs to not only contend for unlicensed spectrum in CP duration, but also utilize reserved unlicensed spectrum in CFP duration. Based on the framework, we set our objective to maximize the total throughput of cellular user equipments and non-safety VUEs, and propose a three-step decomposing scheme, which is nested with interior point method and matching algorithm. We also assess the ergodic sum rate with respect to statistical channel state information with reduced computation complexity.