\documentclass{standalone}
\usepackage[polish]{babel}
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage{tikz}


\begin{document}

\begin{tikzpicture}
\draw[thick] [->] (0,0) -- (5,0) node [below] {$x$};
\draw[thick] [->] (0,0) -- (0,4) node [left] {$y$};
\coordinate [label=left:{$P_1$}] (P1) at (40:0.7);
\coordinate [label=above:{$P_2$}] (P2) at (50:4);
\coordinate [label=right:{$P_3$}] (P3) at (24:5);
\draw (P1) -- (P2) -- (P3) -- cycle;
\draw[dotted] (0,3) -- (3,0);

% uzupełnienie rysunku
\draw[dashed] (P1) -- (P1 |- 0,0);
\draw[dashed] (P2) -- (P2 |- 0,0);
\draw[dashed] (P3) -- (P3 |- 0,0);

\coordinate [label=above:{$A$}] (A) 
  at (intersection of 0,3--3,0 and P1--P2);
\coordinate [label=below:{$B$}] (B) 
  at (intersection of 0,3--3,0 and P1--P3);
\draw (A) -- (B);
\end{tikzpicture}

\end{document}