It wouldn't be possible to extend the foam under the walls. You want to cut the foam to fit inside the bottom ring and then use a foam cove kit to cover the small gap. There are pics of this process in my build.
https://www.troublefreepool.com/threads/pool-build-18-round-with-foam-board-pad.179427/