Urs gave a few good points but here's some more assistance.
1. If you do not have access to the HTML and you only have class. You can use index placement in the DOM. Just a note, if HTML changes, your code may break. Urs comment on using data-attributes is a far better approach. But for a quick solution, you will want to know where Button A and Button B is placed.
There are two approaches to this. One is easier, the other is harder but covers more browsers.
Option 1: If you don't care about IE8 and older browsers, you can use the CSS selector: nth-type-of (Details: https://www.w3schools.com/cssref/sel_nth-of-type.asp)
So your CSS click listener for Button A will be:
.adobeclick:nth-type-of(0)
And Button B will be:
.adobeclick:nth-type-of(1)
Option 2: You can do this by using the javascript function: getElementsByClassName() (Details: https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName). For example, if button A is first on the DOM and button B is second you can do this:
For button A:
document.getElementsByClassName('adobeclick')[0]
For button B:
document.getElementsByClassName('adobeclick')[1]
From there, you can just add a click listener and then fire "trigger()"
2. To measure clicks of a link that is not onClick, I'm not too sure what you mean by that since there's out of the box link tracking but you can also try mousedown (either Launch out of the box or as a javascript custom code).
3. AJAX clicks are interesting as you can listen via network calls as a last ditch effort (if you don't have access to the code) but you can also just fire custom events alongside the ajax call (if you have access). I would refer to Urs' links for dispatching events or using the datalayer.