The structure of neutron-deficient nuclei plays a vital role in nucleosynthesis via the rp process. Near the proton drip line, the Q values of (p,g) reactions are low and the reaction rates are dominated by single resonances and direct capture. We present here studies of 25Si and 26P produced through one-neutron knockout and charge exchange at the National Superconducting Cyclotron Laboratory at Michigan State University. Energy levels and branching ratios in 25Si and 26P were measured using in-beam gamma-ray spectroscopy with the high-efficiency CsI(Na) array CAESAR and the high-resolution segmented Ge array SeGA. The results are compared with the mirror nuclei to show a significant Thomas-Ehrman shift in this region. Shell-model calculations using the USDB-CDPN interaction with a downward shift of the single-particle energy for the 1S1/2 proton orbital to reproduce the observed Thomas-Ehrman shift are discussed and used with the experimentally measured resonances to calculate the (p,g) reaction rates.