If you're arriving into the International Terminal 5 (presumably on a UA international flight) then you have to clear immigration first. If you have checked baggage you have to claim it and go through customs. Immediately after you've done this you can re-check it through to your final destination at the AA interline desk on the right. Then you come out of the secure area and into the public-access one of T5.
You then have to connect to Terminal 3 - the easiest way to do this is to take the Airport Transit System train which goes through all the terminals every few minutes. Unfortunately you have to re-clear security at Terminal 3 (as is the case for all arriving international passengers at ORD, regardless of what terminal you're connecting to).
You cannot walk between T5 and T3 as T5 is isolated from the other 3 terminals and there are power-mad traffic officials outside on the road that will bark at you if you attempt to walk on it.
If you have any other questions about ORD, let me know.