Hi, I want to measure the phase difference of 2 low frequency signals with AD8302, I've read the Datasheet and AN-691 but still not sure how to calculate the optimal capacitor and resistance for C1~C8 and R1, R2. My frequency is approximately 20 kHz, while my amplitude will be around 0.28 Vpp (amplitude can be further adjusted).

There is no closed-form equation to determine the optimal cap value for low frequency operation. The user must experiment a bit with different cap values and determine if the gain & phase error is low enough for their particular application. At 20 kHz input frequency, I would start at a cap value of 1uF and experiment. You can always put bigger caps on if the error isn't low enough. AN-691 should give you some guidance on which caps effect what: input coupling, offset correction, or output video bandwidth.