Andromeda Black has not apparently been paying any attention to her surroundings, but she's a seventh-year Slytherin prefect who has never gotten on enormously well with her housemates even before last month. She is in fact paying exquisite, detailed, and continuous attention to her surroundings. So she has, at this point, a decent idea of what she's looking at, when she contemplates Slytherin's newest reckless little revolutionary. She seems the type who might even left to her own devices make a serious dent, but there's a lot of Slytherins and only one Ophelia. Andy didn't start disagreeing with her housemates out loud until she was fourteen and even then she had Bellatrix hovering protectively over her shoulder until she went a little too far. Ophelia needs allies, and fast, but Andy's going to graduate at the end of this year and associating with her is liable to put a ticking time-bomb of a target on the poor kid's back. Wise of her, to try to leave a note instead of talking to her out loud.
She pulls an apparently unrelated book out of her pocket as if to check a reference, muttering to herself about the NEWT charms schedule, to read the note carefully folded into its pages, and then shoves it back away to contemplate her slightly more refined model of the kid she's trying to help. She quietly drafts a response note in her pocket (bless scribing charms) while Umbridge is talking, absently tracking other whispered conversations among the upperclassmen, and considers how best to deliver it. Right now the biggest lever she has, she suspects, is the fact that Narcissa cannot actually envision the experience of getting disowned and being pleased about that instead of horribly traumatized, which means that anything Andromeda does in the next, like, week or so will be taken to be irrational lashing-out behavior and clearly not a scheme.
What does she want Narcissa to think she very sincerely feels and is not doing schemes about?
... Oh, that's easy now that she puts it that way: she wants Narcissa to think she hates clever rude little Ophelia Prince, so that Narcissa will, spitefully, decide the shiny new revolutionary is her very favorite. Malfoy and Lestrange and so on will follow her off that cliff like stupid, evil little ducklings.
So she ostentatiously pulls the note from her pocket - quite as though she had not noticed it being placed there, so Ophelia can brag about that later if she wants to - and lights it aflame. As they're approaching the common room door, she strides through the small pile of first-years, cutting off the last sentence or so of Umbridge's speech with a dismissive flick of her wrist (this is not a spell, Umbridge just knows to stop talking when Andromeda says so). She lights the page on fire, dramatically, and shoves it into Ophelia's chest. This looks like it should hurt quite a lot, but doesn't actually.
"How dare you," she snarls, sharp and imperious and carrying, "little tiny unproven child, thinking you have any right to talk to me. Last warning. Next time you'll be hanging from the rafters by the skin of your ankles." Then, as she leans in threateningly, while her face is very close to Ophelia's, and her back is to the crowd, she grins a bright, conspiratorial smile, for a split second. "Andromeda, by the way," she murmurs, inaudible to anyone else, "Black, though not for long," and then blatantly swipes an apple slice from Ophelia's pocket (leaving her response note, of course, in its place) and stalks off in a very convincing huff.
Ophelia may not get an opportunity to read the note quite yet. Because, of course, Narcissa Black has at once swept over, cooing sympathetically, to tell her how brave and clever she is, don't mind Andy she's just like that all the time, did she need help with something, Narcissa will of course be happy to help, etcetera.
In the near distance, Andromeda Black-but-not-for-long, stony-faced, does not smirk triumphantly.