This paper introduces a stochastic geometry framework for modeling and analysis of a heterogeneous wireless network with cellular and WiFi radio access technologies (RATs). Our focus here is to study the coexistence performance of the cellular and WiFi subnetworks in the WiFi frequency spectrum (band). The cellular subnetwork consists of macro and small cell access points (APs) with WiFi spectrum access. We first define the coexisting success probability in the WiFi frequency band as the sum of the density-weighted success probabilities of two subnetworks. The closed-form coexisting success probability is found and it is shown to have the concavity over the number of channels in the WiFi frequency band. The optimal deployment densities of small cell and WiFi access points (APs) that maximize the coexisting success probability are shown to exist and found under the derived constraint on network parameters. We then define the coexisting throughput as the sum of the throughputs of the two subnetworks and claim its unique maximum can be attained by the appropriate setting of AP densities. Numerical results indicate that the coexisting throughput is significantly higher than the throughput when only WiFi APs can access the WiFi frequency band.