The call option with strike $X$ and maturity $T$ on a ZCB maturing at time $S$, where $T\le S$, is $$ZBO(t,T,S,X)=E_t[e^{-\int_t^Tr_sds}(P(T,S)-X)^+]$$ The ZCB price is denoted by $$P(t,T)=E_t[e^{-\int_t^Tr_sds}]$$ I am familiar with the Black-Scholes metholodogy of deriving the call option price from first principles, and I am interested in applying the methodology here to compute the bond option price. The Vasicek model allows the bond price to be computed analytically. The SDE for the short rate is $$dr_t=k(\theta-r_t)dt+\sigma dW_t$$ and it can be shown that the bond price is $$P(t,T)=A(t,T)e^{-B(t,T)r_t}$$ where $$B(t,T)=\frac{1}{k}(1-e^{-k(T-t)})$$ and $$A(t,T)=\exp{\bigg[\Big(\theta-\frac{\sigma^2}{2k^2}\Big)[B(t,T)-T+t]-\frac{\sigma^2}{4k}B(t,T)^2}\bigg]$$ My initial steps are to express $ZBO(t,T,S,X)$ in terms of indicator functions, as follows \begin{align} ZBO(t,T,S,X)&=E_t\Big(e^{-\int_t^Tr_sds}(P(T,S)-X)\mathbb{1}_{P(T,S)>K}\Big)\\ &=E_t\Big(e^{-\int_t^Tr_sds}P(T,S)\mathbb{1}_{P(T,S)>K}\Big)-XE_t\Big(e^{-\int_t^Tr_sds}\mathbb{1}_{P(T,S)>K}\Big)\\ &=E_t\Big(e^{-\int_t^Tr_sds}E_t[e^{-\int_T^Sr_sds}]\mathbb{1}_{P(T,S)>K}\Big)-XE_t\Big(e^{-\int_t^Tr_sds}\mathbb{1}_{P(T,S)>K}\Big)\\ &=E_t\Big(e^{-\int_t^Sr_sds}\mathbb{1}_{P(T,S)>K}\Big)-XE_t\Big(e^{-\int_t^Tr_sds}\mathbb{1}_{P(T,S)>K}\Big)\\ &=E_t\Big(P(t,S)\mathbb{1}_{P(T,S)>K}\Big)-XE_t\Big(P(t,T)\mathbb{1}_{P(T,S)>K}\Big)\\ \end{align} The main issues are that I have assumed $e^{-\int_t^Tr_sds}E_t[e^{-\int_T^Sr_sds}]=e^{-\int_t^Sr_sds}$ and that $P(t,T)$ appears to be a random variable, even though it is a $\mathbb{Q}$ expectation and thus a constant. Furthermore, the Black-Scholes methodology can only be applied after changing numeraires. If there is a Radon-Nikodym derivative that can do the following $$E_t\Big(P(t,S)\mathbb{1}_{P(T,S)>K}\Big)-XE_t\Big(P(t,T)\mathbb{1}_{P(T,S)>K}\Big)=E_t\Big(P(T,S)\mathbb{1}_{P(T,S)>K}\Big)-XE_t\Big(P(T,S)\mathbb{1}_{P(T,S)>K}\Big)$$ then the bond price can easily be found.
Any help is appreciated.