This arrangement can work well at least short term , maybe long .
Try and get younger fish, if you can juveniles and raise them up together , they may get along better as they age , though there is no guarantee , and they may end up being crowded as well.
You'll most likely have problems if they breed , territory disputes , some fish want or need the whole tank .
Try and add as many retreats as you can , this can reduce stress , the fish's stress ,

maybe yours too

, and give the fish a chance to rest .
The fish are peaceful , but can get aggressive , this shouldn't be too serious [IME not life threatening ].
Just be ready to move some fish If you have to .
Is your tank 30" long ? If so

it's best for the fish if you keep only one pair in it , see how it goes .
Keyholes grow to about twice the size of blue rams , not that it matters , just in case you didn't know .

around 4 and 2" respectively.
Why not look into harlequin rasbora for your schoolers ?