The force on the charge q will always be given by Coulomb's Law
F=(1/4πεo)Qq/x²
where x is the distance between the charges.
You can't calculate its actual value as you are not given any numbers, you just need to say what x is in each case (in terms of R and r) and substitute it in the formula.
For example, for A, x=R. For B, x=r. (I assume that the size of the grid is R by r, where r is the shorter side. It's not clear from your diagram. You seem to be saying they are both R, but they are clearly not equal.)
So your answer each time is just the formula for Coulomb's Law with the value of x changed so that it is the distance between the charges in terms of R and r.