The tcp_cubic.c and tcp_bic.c are kernel modules. So they can be modified, recompiled and dynamically plugged into a running kernel. The tcp_input.c file , however is part of the kernel image by default. So you have to recompile the full kernel and reboot using the new image, if you change this file.
Modify the files and recompile the whole kernel, by running make from the top level kernel source directory and add the new kernel image entry to the grub config file. For a distro like ubuntu, you have tools like make-kpkg which does most of the dirty work for you. You can easily find online tutorials like How To Compile A Kernel - The Ubuntu Way