A few details
One of these species, species A, is close to the common ancestor of A and B, in terms of evolutionary distance, while B is farther although for both cases, it took two speciation events to end up with species A and species B.
I have two issues here.
I don't understand why this information matter for your question.
There are several metrics of evolutionary distance. In terms of time to common ancestor and therefore, in terms of number of neutral substitutions (it is ok if you don't understand why I talk about neutral substitutions) species A and species B are at exactly the same "evolutionary distance" to any of their common ancestor. However, you may want to talk about evolutionary distance in terms of "By how many standard deviations of a quantitative trait did the mean trait value shifted since the common ancestor (in haldanes unit by definition)", then one species might be more closely related to the ancestor indeed. But in such case, you need to talk about the quantitative trait resulting from protein changes and not directly at the discrete, non-ordinal (nominal) nature of proteins.
And a third general issue I have
- As I understand the question, I don't think the question is specific to proteins at all. The question seem rather to relate to "environment specific adaptation in comparative genomics and reaction norms" and would be completely legitimate to look at that at the level of a protein or of a quantitative traits.
To answer your question
You are interested in the measure of fitness as a function of both environment and the protein under consideration. The relationship between the fitness (and other quantitative traits) and the envrionment is referred to as the reaction norm.
Here the graph display the quantitative trait (could be fitness) in the Y axis and environment in the X axis (as it is usually represented).There are two lines, for two different genotypes (the two different proteins in your case).
Can we show that the protein evolved to a degree to suit the different environment of species B compared to species A?
Well, looking at the graphs it looks like indeed one protein has been under selection in one environment while the other has been under selection under the other environment. Testing this is just a matter of statistics. Basically, to test for this, you run a linear model with the quantiative trait (eventually fitness) as the response variable and the environment, the genotype and their interaction as explainatory variables. If the interaction term is significant (and if the directionality of the interaction is the one you would expect, that is genotypes are more fit in the environment where they live and if each genotype outcompete the other in at least one environment), then the genotypes are locally adapted.
what counts as significant?
You can chose the level of significance that you wish (0.05 for example). If this is unclear, you'll probably want to learn more about stats before.
can you provide an example of when this method you have described was used the literature to show the evolution of a protein?
If you want example from the literature you can just type
Genotype by Environment Interaction on google scholar and will get tons of hits. Here is a paper discussing this methodology specifically and here is a (old) book on the subject. I am not sure why you're still talking about proteins. Most often those studies are done at the level of the gene (or directly on the phenotypic trait). But you can find the gene and get the protein sequence from it or even play around to visualize it with various biophysics softwares.