That wasn’t what has been instructed. Please do exactly as stated above and simply change the Medium image size in your media settings and then regenerate your thumbnails.
In case you want to code a custom template for the attachment page instead, you also might want to have a look at the WordPress template hierarchy.
If you still don’t believe us that by default WordPress displays the Medium image size on attachment pages, then please do some research as this information is stated in several tutorials and documentation as well, for example here and here.
Quotes:
By default, the attachment page will display the “medium” size of the image (the size options thumbnail, medium and large can be configured in Settings ? Media, full size is the actual image size)…
By default, WordPress is coded to display the medium size image.