It seems that you are interested in a Newtonian/classical interpretation.
You can apply the equilibrium equation. The basic principle is that if an object is at rest then the sum of the forces applied on it is zero.
So isolate one of the objects with mass $m$ on the table. The forces on it are :
* the weight $\vec P=\vec g\cdot m$ where $\vec g$ is Earth's gravitational acceleration ($\approx 9.8 m/s^2$)
* the force $\vec T$ the table is applying on the object, and
* the force the other object is applaying $\vec F$
Since $m$ is at rest it must hold that
$\vec F+\vec T+\vec g\cdot m=0 $.
If we suppose that the two objects are cubic or anyway in contact with vertical plane surfaces then we know the force $F$ is horizontal and we can divide in two scalar equations :
This actually tells us that the total force the bodies are exchanging is zero but it doesn't say how it could be distributed on the surface.
For the second problem, other than the weight we have already seen we have two forces which are respectively applied by the first and second finger, so all we can say is that $\vec F_1+\vec F_2=-m\cdot\vec g$.
We cannot determine the two forces without further information. This is pretty intuitive since you could hold the pen lightly or stronger still keeping it firm and in the same exact position.