This is not a simple problem to solve for mathematically. To do so you would need to know the temperature and velocity of the air coming out of the AC unit, as well as the velocity of air outside as well as which windows are open and at what angle outside air is hitting the windows. Basically, you would need to figure out how well the AC air mixes with the room air as well as the the general paths the air currents follow.
As others have mentioned, humidity is also a concern. If you are bringing in humidity from the outside the AC will have to work harder to remove it.
For example, if the air from the A/C follows a laminar flow and does not mix well with the air in the room right away, a large part of it could goes out the window without having reduced air temperature. 108
The larger the temperature differential between the AC air and the room air, and the lower the amount of mixing occurs, the less efficient it is going to be.
Most likely it would be easier to just perform some experiments, trying to control for a single variable at a time.
However, having said that, assuming sufficient mixing of the air what you are going to see in practice is that opening the window causes the temperature to cool faster, because you have two sources of air colder than the room. You could set up an equation using two idealized heat transfers to try to approximate it. But if the temperature differential is only 4C you may find it doesn't really cool that much faster, and things like wind gusts and humidity may make it a wash. In my experience, latent heat from the structure itself makes it very difficult to bring room temperature that close to outside air temperature (for instance, in a brick/stone wall type building I have found it difficult to cool an interior to closer than 5C above outdoor temperature over the course of a night).
However, in any case using both the AC and opening the windows will obviously use more electricity than just opening the windows. 108