Short explanation
According to the papers I could find, Dendrelaphis ashoki and D. girii aren't as closely related as you suggest: D. ashoki appears to be closely related to D. pictus, a Southeast Asian snake species, while D. girii appears to be closely related to D. bifrenalis, a Sri Lankan/South Indian snake species. They were distinguished from their sister species largely on the basis of morphological differences and geographical isolation.
How do we know D. ashoki is a distinct species?
The key to this answer is in <PERSON> and <PERSON>, 2011a, the scientific article in which Dendrelaphis ashoki was first described. Before their work, these snakes were thought to belong to the species Dendrelaphis pictus. To test whether this was in fact the case, they compared 9 individuals of D. ashoki with 34 individuals of D. pictus, and found statistically significant ($p < 0.05$) differences in five morphological characters: SUBC (number of subcaudals), TAIL (tail-length), EYED (horizontal diameter of the eye), SUBL (number of infralabials touched by the first sublabial, left and right added) and STRIPE1 (ventrolateral stripe bright/dull/absent). Here's the statistical analyses they ran:
The south Indian form that has previously been referred to as D. pictus (e.g., <PERSON>, 1921; <PERSON>, 1943; <PERSON> and Captain, 2004) differs from Indochinese D. pictus in the characters SUBC ($F_{1,25} = 17.7, P = 0.0003$), TAIL ($F_{1,25} = 30.0, P = 0.00003$), EYED ($F_{1,35} = 22.5, P = 0.00003$), SUBL (Mann-Whitney U, $Z = −4.6, N=40, P < 0.00001$) and STRIPE1 ($\chi^2_1 = 42, P < 0.00001$).
They also compared the 9 individuals of D. ashoki with 48 individuals of D. proarchos, and found statistically significant ($p < 0.05$) differences in five morphological characters: VENT (number of ventrals), SUBC (number of subcaudals), TAIL (tail-length), EYED (horizontal eye diameter), SUBL (number of infralabials touched by the first sublabial, left and right added) and STRIPE1 (ventrolateral stripe bright/dull/absent).
[The south Indian form] differs from D. 249
proarchos in VENT ($F_{1,49} = 24.1, P = 0.00001$), SUBC ($F_{1,28} = 13.7, P=0.001$), TAIL ($F_{1,28} = 40.1, P < 0.00001$), EYED ($F_{1,47} = 16.8, P=0.0001$), SUBL (Mann-Whitney U, $Z = −4.7, N=52, P < 0.00001$), and STRIPE1 ($\chi^2_1 = 53.0, P < 0.00001$).
The authors didn't rely just on morphological evidence: they note that D. ashoki, which is found in the Western Ghats, is also geographically isolated from other populations of D. pictus, which are found in Northeast India, Myanmar and South East Asia. Therefore, they concluded (emphasis mine):
The distinct morphology and coloration as well as strong geographic isolation of the population from the Western Ghats imply a unique evolutionary history that does not allow application of either the name D. pictus or the name D. proarchos. Consequently, we describe this form, previously referred to as D. pictus, as a new species, D. ashoki sp. nov., endemic to the Western Ghats.
How do we know that D. girii is a distinct species?
For this information, we need to look up another paper published that same year, <PERSON> and <PERSON>, 2011b. Interestingly, the authors don't compare this snake with D. ashoki at all, but with Dendrelaphis bifrenalis:
Due to their double loreal shield, D. girii sp. nov. and D. bifrenalis occupy a unique position within the genus. 321