you didnt state what version of sharepoint your using. Assuming 2010/2013 i would use "sharepoint html form web part" instead to insert custom html and Jquery... its what it was designed for. Just put that webpart on the page and copy paste your code above into the text box area and save the webpart.
edit
below is what your looking for in 2013

also change your code to:
<button id="hide">Hide</button>
<button id="show">Show</button>
<p>If you click on the "Hide" button, I will disappear.
<br />
Bo po to jest to wśród nas.
</p>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
//ExecuteOrDelayUntilScriptLoaded(function(){
$("#hide").click(function(){
$("p").hide(5000);
});
$("#show").click(function(){
$("p").show(2000);
});
//},"sp.js");
});
</script>
no need for head and body! it will throw errors as you already have both in the parent.
EDIT 2
try this code instead:
<button id="idhide" type="button" onclick="hide();">Hide</button>
<button id="idshow" type="button" onclick="show();">Show</button>
<div id="showhide">
<p>If you click on the "Hide" button, I will disappear.
<br />
Bo po to jest to wśród nas.
</p>
<div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script type="text/javascript">
function hide()
{
$("#showhide p").hide(5000);
}
function show()
{
$("#showhide p").show(2000);
}
</script>
or
your code slightly modified, need to put in type in the button so that it knows its a button and doesn't produce a postback when referencing a javascript event.
<button type="button" id="idhide">Hide</button>
<button type="button" id="idshow">Show</button>
<p>If you click on the "Hide" button, I will disappear.
<br />
Bo po to jest to wśród nas.
</p>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
//ExecuteOrDelayUntilScriptLoaded(function(){
$("#idhide").click(function(){
$("p").hide(5000);
});
$("#idshow").click(function(){
$("p").show(2000);
});
//},"sp.js");
});
</script>